Skip to content

Commit cbde98e

Browse files
committed
CA1849
1 parent acc8a64 commit cbde98e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/OpenTelemetry.Exporter.Prometheus.HttpListener.Tests/PrometheusCollectionManagerTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public async Task EnterExitCollectTest(int scrapeResponseCacheDurationMillisecon
4343
exporter.Collect = (timeout) =>
4444
{
4545
bool result = collectFunc!(timeout);
46-
runningCollectCount++;
46+
Interlocked.Increment(ref runningCollectCount);
4747
Thread.Sleep(5000);
4848
return result;
4949
};
@@ -112,7 +112,7 @@ public async Task EnterExitCollectTest(int scrapeResponseCacheDurationMillisecon
112112
exporter.CollectionManager.ExitCollect();
113113
}
114114

115-
Thread.Sleep(exporter.ScrapeResponseCacheDurationMilliseconds);
115+
await Task.Delay(exporter.ScrapeResponseCacheDurationMilliseconds);
116116

117117
counter.Add(100);
118118

0 commit comments

Comments
 (0)