File tree 1 file changed +4
-5
lines changed
test/OpenTelemetry.Tests/Trace
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ public void CheckForceFlushExport(int timeout)
118
118
[ InlineData ( Timeout . Infinite ) ]
119
119
[ InlineData ( 0 ) ]
120
120
[ InlineData ( 1 ) ]
121
- public void CheckShutdownExport ( int timeout )
121
+ public void CheckShutdownExport ( int timeoutMilliseconds )
122
122
{
123
123
var exportedItems = new List < Activity > ( ) ;
124
124
using var exporter = new InMemoryExporter < Activity > ( exportedItems ) ;
@@ -134,12 +134,11 @@ public void CheckShutdownExport(int timeout)
134
134
} ;
135
135
136
136
processor . OnEnd ( activity ) ;
137
- processor . Shutdown ( timeout ) ;
137
+ processor . Shutdown ( timeoutMilliseconds ) ;
138
138
139
- if ( timeout == 0 )
139
+ if ( timeoutMilliseconds < 1_000 )
140
140
{
141
- // Shutdown(0) will trigger flush and return immediately, so let's sleep for a while
142
- Thread . Sleep ( 1_000 ) ;
141
+ Thread . Sleep ( 1_000 - timeoutMilliseconds ) ;
143
142
}
144
143
145
144
Assert . Single ( exportedItems ) ;
You can’t perform that action at this time.
0 commit comments