@@ -781,7 +781,7 @@ public void VerifyDeduplication() {
781
781
var errorPlugin = new SimpleErrorPlugin ( ) ;
782
782
783
783
EventPluginContext mergedContext = null ;
784
- using ( var duplicateCheckerPlugin = new DuplicateCheckerPlugin ( TimeSpan . FromMilliseconds ( 40 ) ) ) {
784
+ using ( var duplicateCheckerPlugin = new DuplicateCheckerPlugin ( TimeSpan . FromSeconds ( 1 ) ) ) {
785
785
for ( int index = 0 ; index < 10 ; index ++ ) {
786
786
var builder = GetException ( ) . ToExceptionless ( ) ;
787
787
var context = new EventPluginContext ( client , builder . Target , builder . PluginContextData ) ;
@@ -808,22 +808,24 @@ public void VerifyDeduplicationPluginWillCallSubmittingHandler() {
808
808
var client = CreateClient ( ) ;
809
809
foreach ( var plugin in client . Configuration . Plugins )
810
810
client . Configuration . RemovePlugin ( plugin . Key ) ;
811
- client . Configuration . AddPlugin ( new DuplicateCheckerPlugin ( TimeSpan . FromMilliseconds ( 75 ) ) ) ;
812
811
813
812
int submittingEventHandlerCalls = 0 ;
814
- client . SubmittingEvent += ( sender , args ) => {
815
- Interlocked . Increment ( ref submittingEventHandlerCalls ) ;
816
- } ;
813
+ using ( var duplicateCheckerPlugin = new DuplicateCheckerPlugin ( TimeSpan . FromSeconds ( 1 ) ) ) {
814
+ client . Configuration . AddPlugin ( duplicateCheckerPlugin ) ;
817
815
818
- for ( int index = 0 ; index < 3 ; index ++ ) {
819
- client . SubmitLog ( "test" ) ;
820
- if ( index > 0 )
821
- continue ;
816
+ client . SubmittingEvent += ( sender , args ) => {
817
+ Interlocked . Increment ( ref submittingEventHandlerCalls ) ;
818
+ } ;
819
+
820
+ for ( int index = 0 ; index < 3 ; index ++ ) {
821
+ client . SubmitLog ( "test" ) ;
822
+ if ( index > 0 )
823
+ continue ;
822
824
823
- Assert . Equal ( 1 , submittingEventHandlerCalls ) ;
825
+ Assert . Equal ( 1 , submittingEventHandlerCalls ) ;
826
+ }
824
827
}
825
828
826
- Thread . Sleep ( 100 ) ;
827
829
Assert . Equal ( 2 , submittingEventHandlerCalls ) ;
828
830
}
829
831
0 commit comments