File tree Expand file tree Collapse file tree 4 files changed +6
-9
lines changed
OptimizelySDK.Tests/EventTests Expand file tree Collapse file tree 4 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ class BatchEventProcessorTest
2828 private Mock < ILogger > LoggerMock ;
2929 private BlockingCollection < object > eventQueue ;
3030 private BatchEventProcessor EventProcessor ;
31- private Mock < IEventDispatcher > EventDispatcherMock ;
32- private TestEventDispatcher TestEventDispatcher ;
31+ private Mock < IEventDispatcher > EventDispatcherMock ;
3332 private NotificationCenter NotificationCenter = new NotificationCenter ( ) ;
3433 private Mock < TestNotificationCallbacks > NotificationCallbackMock ;
3534
Original file line number Diff line number Diff line change @@ -145,6 +145,8 @@ public void Flush()
145145
146146 private void FlushQueue ( )
147147 {
148+ FlushingIntervalDeadline = DateTime . Now . MillisecondsSince1970 ( ) + ( long ) FlushInterval . TotalMilliseconds ;
149+
148150 if ( CurrentBatch . Count == 0 )
149151 {
150152 return ;
@@ -350,8 +352,8 @@ public BatchEventProcessor Build(bool start)
350352 batchEventProcessor . NotificationCenter = NotificationCenter ;
351353
352354 batchEventProcessor . BatchSize = BatchSize < 1 ? BatchEventProcessor . DEFAULT_BATCH_SIZE : BatchSize ;
353- batchEventProcessor . FlushInterval = FlushInterval < TimeSpan . FromSeconds ( 1 ) ? BatchEventProcessor . DEFAULT_FLUSH_INTERVAL : FlushInterval ;
354- batchEventProcessor . TimeoutInterval = TimeoutInterval < TimeSpan . FromSeconds ( 1 ) ? BatchEventProcessor . DEFAULT_TIMEOUT_INTERVAL : TimeoutInterval ;
355+ batchEventProcessor . FlushInterval = FlushInterval <= TimeSpan . FromSeconds ( 0 ) ? BatchEventProcessor . DEFAULT_FLUSH_INTERVAL : FlushInterval ;
356+ batchEventProcessor . TimeoutInterval = TimeoutInterval <= TimeSpan . FromSeconds ( 0 ) ? BatchEventProcessor . DEFAULT_TIMEOUT_INTERVAL : TimeoutInterval ;
355357
356358 if ( start )
357359 batchEventProcessor . Start ( ) ;
Original file line number Diff line number Diff line change @@ -48,8 +48,6 @@ public class Builder
4848 private string AccountId ;
4949 private string ProjectId ;
5050 private string Revision ;
51- private string ClientName ;
52- private string ClientVersion ;
5351 private bool AnonymizeIP ;
5452
5553 public Builder WithAccountId ( string accountId )
Original file line number Diff line number Diff line change @@ -36,9 +36,7 @@ public class ImpressionEvent : UserEvent
3636 /// </summary>
3737 public class Builder
3838 {
39- private string UserId ;
40- private string UUID ;
41- private long Timestamp ;
39+ private string UserId ;
4240 private EventContext EventContext ;
4341
4442 public VisitorAttribute [ ] VisitorAttributes ;
You can’t perform that action at this time.
0 commit comments