Skip to content

Commit 934f05d

Browse files
committed
flaky test
1 parent 60d8f26 commit 934f05d

3 files changed

Lines changed: 33 additions & 5 deletions

File tree

docs/package-lock.json

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/Surefire.Tests.Conformance/ContentionConformanceTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ await Store.TryCreateRunAsync(new()
5959
}
6060
catch (OperationCanceledException) { }
6161
catch (Exception ex) { failures.Add(ex); }
62+
63+
await Task.Yield();
6264
}
6365
})).ToArray();
6466

test/Surefire.Tests.Conformance/RuntimeReliabilityConformanceTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public async Task ContinuousJob_SeedsToMaxConcurrency_OnStartup()
1818
options.AutoMigrate = false;
1919
options.PollingInterval = TimeSpan.FromMilliseconds(20);
2020
options.HeartbeatInterval = TimeSpan.FromMilliseconds(40);
21-
options.InactiveThreshold = TimeSpan.FromMilliseconds(250);
21+
options.InactiveThreshold = TimeSpan.FromSeconds(10);
2222
options.RetentionPeriod = null;
2323
options.MaxNodeConcurrency = 10;
2424
},
@@ -405,7 +405,7 @@ public async Task JobTimeout_TransitionsRunToFailed()
405405
options.AutoMigrate = false;
406406
options.PollingInterval = TimeSpan.FromMilliseconds(20);
407407
options.HeartbeatInterval = TimeSpan.FromMilliseconds(40);
408-
options.InactiveThreshold = TimeSpan.FromMilliseconds(250);
408+
options.InactiveThreshold = TimeSpan.FromSeconds(10);
409409
options.RetentionPeriod = null;
410410
},
411411
(host, _) =>
@@ -415,7 +415,7 @@ public async Task JobTimeout_TransitionsRunToFailed()
415415
jobStarted.TrySetResult();
416416
await Task.Delay(Timeout.InfiniteTimeSpan, ct);
417417
return 1;
418-
}).WithTimeout(TimeSpan.FromSeconds(5));
418+
}).WithTimeout(TimeSpan.FromMilliseconds(250));
419419
});
420420

421421
await harness.StartAsync(ct);
@@ -455,7 +455,7 @@ public async Task JobTimeout_WithRetry_RetriesAfterTimeout()
455455
options.AutoMigrate = false;
456456
options.PollingInterval = TimeSpan.FromMilliseconds(20);
457457
options.HeartbeatInterval = TimeSpan.FromMilliseconds(40);
458-
options.InactiveThreshold = TimeSpan.FromMilliseconds(250);
458+
options.InactiveThreshold = TimeSpan.FromSeconds(10);
459459
options.RetentionPeriod = null;
460460
},
461461
(host, _) =>
@@ -469,7 +469,7 @@ public async Task JobTimeout_WithRetry_RetriesAfterTimeout()
469469
}
470470

471471
return 42;
472-
}).WithTimeout(TimeSpan.FromSeconds(5))
472+
}).WithTimeout(TimeSpan.FromMilliseconds(250))
473473
.WithRetry(policy =>
474474
{
475475
policy.MaxRetries = 1;

0 commit comments

Comments
 (0)