File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,9 @@ func TestDefaultEventProcessor_LogEventNotification(t *testing.T) {
123
123
func TestDefaultEventProcessor_DefaultConfig (t * testing.T ) {
124
124
exeCtx := utils .NewCancelableExecutionCtx ()
125
125
processor := NewBatchEventProcessor (
126
- WithEventDispatcher (NewMockDispatcher (100 , false )))
126
+ WithEventDispatcher (NewMockDispatcher (100 , false )),
127
+ // here we are setting the timing interval so that we don't have to wait the default 30 seconds
128
+ WithFlushInterval (500 * time .Millisecond ))
127
129
processor .Start (exeCtx )
128
130
129
131
impression := BuildTestImpressionEvent ()
@@ -136,7 +138,8 @@ func TestDefaultEventProcessor_DefaultConfig(t *testing.T) {
136
138
137
139
assert .Equal (t , 4 , processor .EventsCount ())
138
140
139
- time .Sleep (31 * time .Second )
141
+ // sleep for 1 second here. to allow event processor to run.
142
+ time .Sleep (1 * time .Second )
140
143
141
144
assert .NotNil (t , processor .Ticker )
142
145
You can’t perform that action at this time.
0 commit comments