File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Linq ;
3
+ using System . Threading . Tasks ;
3
4
using Exceptionless . Dependency ;
4
5
using Exceptionless . Plugins ;
5
6
using Exceptionless . Plugins . Default ;
@@ -52,6 +53,20 @@ public void EnvironmentInfo_IncorrectEventType(string eventType) {
52
53
Assert . Equal ( 0 , context . Event . Data . Count ) ;
53
54
}
54
55
56
+ [ Fact ]
57
+ public void EnvironmentInfo_CanRunInParallel ( ) {
58
+ var client = new ExceptionlessClient ( ) ;
59
+ var ev = new Event { Type = Event . KnownTypes . SessionStart } ;
60
+ var plugin = new EnvironmentInfoPlugin ( ) ;
61
+
62
+ Parallel . For ( 0 , 10000 , i => {
63
+ var context = new EventPluginContext ( client , ev ) ;
64
+ plugin . Run ( context ) ;
65
+ Assert . Equal ( 1 , context . Event . Data . Count ) ;
66
+ Assert . NotNull ( context . Event . Data [ Event . KnownDataKeys . EnvironmentInfo ] ) ;
67
+ } ) ;
68
+ }
69
+
55
70
[ Fact ]
56
71
public void EnvironmentInfo_ShouldAddSessionStart ( ) {
57
72
var client = new ExceptionlessClient ( ) ;
You can’t perform that action at this time.
0 commit comments