Open platform to collect and prioritize feedback
fix: intermittent build failure (#792)
Guilherme Oenning44f69bec0077
diff --git a/app/pkg/bus/bus.go b/app/pkg/bus/bus.goindex d5fb8c9bc..17398c3e8 100644--- a/app/pkg/bus/bus.go+++ b/app/pkg/bus/bus.go@@ -4,7 +4,6 @@ import ("context""fmt""reflect"- "strings""sync""github.com/getfider/fider/app/models/cmd"@@ -102,7 +101,7 @@ func Dispatch(ctx context.Context, msgs ...Msg) error {key := keyForElement(elem)handler := handlers[key]if handler == nil {- panic(fmt.Errorf("could not find handler for '%s'. Registered handlers are: %s", key, strings.Join(registeredKeys(), ",")))+ panic(fmt.Errorf("could not find handler for '%s'.", key))}var params = []reflect.Value{@@ -155,14 +154,6 @@ func Publish(ctx context.Context, msgs ...Msg) {}}-func registeredKeys() []string {- keys := make([]string, 0)- for key := range handlers {- keys = append(keys, key)- }- return keys-}-func keyForElement(t reflect.Type) string {msgTypeName := t.Name()pkgPath := t.PkgPath()diff --git a/app/pkg/web/autocert_test.go b/app/pkg/web/autocert_test.goindex 0372badaa..e3b3baec0 100644--- a/app/pkg/web/autocert_test.go+++ b/app/pkg/web/autocert_test.go@@ -3,6 +3,7 @@ package webimport ("crypto/tls""testing"+ "time""github.com/getfider/fider/app/pkg/bus""github.com/getfider/fider/app/services/blob/fs"@@ -27,4 +28,7 @@ func Test_UseAutoCert(t *testing.T) {Expect(err.Error()).ContainsSubstring(`for domain "` + serverName + `": no viable challenge type found`)Expect(cert).IsNil()}++ // GetCertificate starts a fire and forget go routine to delete items from cache, give it 500ms to complete it+ time.Sleep(500)}diff --git a/go.mod b/go.modindex d47588f78..53a1fcf38 100644--- a/go.mod+++ b/go.mod@@ -27,4 +27,4 @@ require (golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890golang.org/x/text v0.3.2google.golang.org/appengine v1.0.0-)\ No newline at end of file+)