You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RecentBlogPostsQueryTests.ShouldListBlogPostWhenCallingAQuery test can fail randomly, without the code it tests being wrong, and then succeed on the nest run. I.e., it's flaky.
To Reproduce
I assume that if you run it enough times, eventually, you'll see a random fail. This happened during this build too:
A rerun fixed it. I can't reproduce this locally.
I've seen unit tests being flaky before too, but can't recall any specifics. Please add them here if you notice anything else.
Expected behavior
The test only fails if the code is incorrect.
Screenshots
See above.
The text was updated successfully, but these errors were encountered:
I think this can happen if the test is executed very fast (faster the the clock resolution). In that case both blog post may have the same CreatedUtc and ordering becomes random.
Describe the bug
The
RecentBlogPostsQueryTests.ShouldListBlogPostWhenCallingAQuery
test can fail randomly, without the code it tests being wrong, and then succeed on the nest run. I.e., it's flaky.To Reproduce
I assume that if you run it enough times, eventually, you'll see a random fail. This happened during this build too:
A rerun fixed it. I can't reproduce this locally.
I've seen unit tests being flaky before too, but can't recall any specifics. Please add them here if you notice anything else.
Expected behavior
The test only fails if the code is incorrect.
Screenshots
See above.
The text was updated successfully, but these errors were encountered: