Skip to content

Commit fe49650

Browse files
authored
fix: timing error in tests (#70)
1 parent fc7cb5c commit fe49650

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/CommunityToolkit.Datasync.Client.Test/Threading/QueueHandler_Tests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public async Task QueueHandler_WithThreads_Enqueue(int nThreads)
4747
accId.Should().HaveCount(nElements);
4848
accTh.Should().HaveCount(nElements);
4949
accTh.AsEnumerable().Distinct().Should().HaveCount(nThreads);
50-
(endTime - startTime).TotalSeconds.Should().BeLessThanOrEqualTo((nElements / nThreads) + 2);
50+
// This just makes sure that the amount of time is "of the right order of magnitude" since CI systems
51+
// are notoriously bad at correct timings. We just don't want it to be 10x the expected time.
52+
(endTime - startTime).TotalSeconds.Should().BeLessThanOrEqualTo((nElements / nThreads) + 5);
5153
}
5254

5355
[Theory(Timeout = 30000)]

0 commit comments

Comments
 (0)