diff --git a/Makefile b/Makefile index bb165d7..51e4546 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ binary: unit-test: go vet `go list ./... | grep -v '/vendor/'` - go test -count=1 -timeout 240s -cover ./logs/... \ + go test -race -count=1 -timeout 240s -cover ./logs/... \ ./manager/node/... \ ./manager/workload/... \ ./types/... \ diff --git a/manager/workload/log.go b/manager/workload/log.go index a3d5051..7ecdb73 100644 --- a/manager/workload/log.go +++ b/manager/workload/log.go @@ -48,8 +48,8 @@ func newLogBroadcaster() *logBroadcaster { func (l *logBroadcaster) getSubscribers(app string) map[string]*subscriber { subs, ok := l.subscribersMap.Get(app) if !ok { - l.subscribersMap.Set(app, map[string]*subscriber{}) subs = map[string]*subscriber{} + l.subscribersMap.Set(app, subs) } return subs }