File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 5353 - mkdir -p $GOPATH/src/github.com && pushd $GOPATH/src/github.com && ln -s $HOME/build/optimizely optimizely && popd
5454 script :
5555 # Need to download packages explicitly
56+ - mkdir $GOPATH/src/github.com/twmb && cd $GOPATH/src/github.com/twmb && git clone https://github.com/twmb/murmur3.git && cd $TRAVIS_BUILD_DIR
57+ - pushd $GOPATH/src/github.com/twmb/murmur3 && git checkout v1.0.0 && popd
5658 - go get -v -d ./...
5759 # This pkg not in go 1.8
5860 - go get github.com/stretchr/testify
Original file line number Diff line number Diff line change @@ -154,18 +154,18 @@ func NewBatchEventProcessor(options ...BPOptionConfig) *BatchEventProcessor {
154154 p .Q = NewInMemoryQueue (p .MaxQueueSize )
155155 }
156156
157- return p
158- }
159-
160- // Start initializes the event processor
161- func (p * BatchEventProcessor ) Start (ctx context.Context ) {
162157 if p .EventDispatcher == nil {
163158 dispatcher := NewQueueEventDispatcher (p .metricsRegistry )
164- defer dispatcher .flushEvents ()
165159 p .EventDispatcher = dispatcher
166160 }
167161
168- pLogger .Debug ("Batch event processor started" )
162+ return p
163+ }
164+
165+ // Start does not do any initialization, just starts the ticker
166+ func (p * BatchEventProcessor ) Start (ctx context.Context ) {
167+
168+ pLogger .Info ("Batch event processor started" )
169169 p .startTicker (ctx )
170170}
171171
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ func newExecutionContext() *utils.ExecGroup {
6565func TestDefaultEventProcessor_ProcessImpression (t * testing.T ) {
6666 eg := newExecutionContext ()
6767 processor := NewBatchEventProcessor ()
68- processor .EventDispatcher = nil
68+ processor .EventDispatcher = NewQueueEventDispatcher ( processor . metricsRegistry )
6969 eg .Go (processor .Start )
7070
7171 impression := BuildTestImpressionEvent ()
You can’t perform that action at this time.
0 commit comments