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 53
53
- mkdir -p $GOPATH/src/github.com && pushd $GOPATH/src/github.com && ln -s $HOME/build/optimizely optimizely && popd
54
54
script :
55
55
# 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
56
58
- go get -v -d ./...
57
59
# This pkg not in go 1.8
58
60
- 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 {
154
154
p .Q = NewInMemoryQueue (p .MaxQueueSize )
155
155
}
156
156
157
- return p
158
- }
159
-
160
- // Start initializes the event processor
161
- func (p * BatchEventProcessor ) Start (ctx context.Context ) {
162
157
if p .EventDispatcher == nil {
163
158
dispatcher := NewQueueEventDispatcher (p .metricsRegistry )
164
- defer dispatcher .flushEvents ()
165
159
p .EventDispatcher = dispatcher
166
160
}
167
161
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" )
169
169
p .startTicker (ctx )
170
170
}
171
171
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ func newExecutionContext() *utils.ExecGroup {
65
65
func TestDefaultEventProcessor_ProcessImpression (t * testing.T ) {
66
66
eg := newExecutionContext ()
67
67
processor := NewBatchEventProcessor ()
68
- processor .EventDispatcher = nil
68
+ processor .EventDispatcher = NewQueueEventDispatcher ( processor . metricsRegistry )
69
69
eg .Go (processor .Start )
70
70
71
71
impression := BuildTestImpressionEvent ()
You can’t perform that action at this time.
0 commit comments