Skip to content

Commit

Permalink
Fix invalid assert
Browse files Browse the repository at this point in the history
  • Loading branch information
hez2010 committed Apr 20, 2024
1 parent 3ee6067 commit d930f97
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ public async Task EnterExitCollectTest(int scrapeResponseCacheDurationMillisecon

// This should use the cache and ignore the second counter update.
var task = exporter.CollectionManager.EnterCollect();
Assert.True(task.IsCompleted);
if (cacheEnabled)
{
Assert.True(task.IsCompleted);
}

var response = await task;
try
{
Expand Down

0 comments on commit d930f97

Please sign in to comment.