diff --git a/.travis.yml b/.travis.yml index 3bd0f3772..0b8e64ff9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,6 +53,8 @@ jobs: - mkdir -p $GOPATH/src/github.com && pushd $GOPATH/src/github.com && ln -s $HOME/build/optimizely optimizely && popd script: # Need to download packages explicitly + - mkdir $GOPATH/src/github.com/twmb && cd $GOPATH/src/github.com/twmb && git clone https://github.com/twmb/murmur3.git && cd $TRAVIS_BUILD_DIR + - pushd $GOPATH/src/github.com/twmb/murmur3 && git checkout v1.0.0 && popd - go get -v -d ./... # This pkg not in go 1.8 - go get github.com/stretchr/testify diff --git a/pkg/event/processor.go b/pkg/event/processor.go index 817b437e2..4ca9e67bc 100644 --- a/pkg/event/processor.go +++ b/pkg/event/processor.go @@ -154,18 +154,18 @@ func NewBatchEventProcessor(options ...BPOptionConfig) *BatchEventProcessor { p.Q = NewInMemoryQueue(p.MaxQueueSize) } - return p -} - -// Start initializes the event processor -func (p *BatchEventProcessor) Start(ctx context.Context) { if p.EventDispatcher == nil { dispatcher := NewQueueEventDispatcher(p.metricsRegistry) - defer dispatcher.flushEvents() p.EventDispatcher = dispatcher } - pLogger.Debug("Batch event processor started") + return p +} + +// Start does not do any initialization, just starts the ticker +func (p *BatchEventProcessor) Start(ctx context.Context) { + + pLogger.Info("Batch event processor started") p.startTicker(ctx) } diff --git a/pkg/event/processor_test.go b/pkg/event/processor_test.go index 5d408579f..bb1a478c8 100644 --- a/pkg/event/processor_test.go +++ b/pkg/event/processor_test.go @@ -65,7 +65,7 @@ func newExecutionContext() *utils.ExecGroup { func TestDefaultEventProcessor_ProcessImpression(t *testing.T) { eg := newExecutionContext() processor := NewBatchEventProcessor() - processor.EventDispatcher = nil + processor.EventDispatcher = NewQueueEventDispatcher(processor.metricsRegistry) eg.Go(processor.Start) impression := BuildTestImpressionEvent()