Skip to content

test: EXPOSED-229 Fix flaky SQL Server test on TC build #1942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 14, 2023

Conversation

bog-walk
Copy link
Member

@bog-walk bog-walk commented Dec 13, 2023

The following test in exposed-jodatime fails sporadically on TC builds, only on SQL Server:

JodaTimeDefaultsTest/testDefaultCurrentDateTime()

Flakiness is not reproducible locally with repeated tests, so the assumption to the cause is:

Hypothesis: Inconsistency with Thread.sleep?
- The test always fails on the first assertTrue and debug logs used in TC build show that the second inserted value happens +/-10ms around the 2s check.
- A 1s epsilon value has been added to a single Thread.sleep to provide a comparison buffer for SQL Server only.

Fix for JodaTimeDefaultsTest/testDefaultCurrentDateTime()
Adjust TC debug and other module tests
Provide a small epsilon for value comparison initially.
Only use epsilon value for SQL Server.

Revert other module tests.
@bog-walk bog-walk requested a review from e5l December 13, 2023 19:49
@bog-walk bog-walk merged commit f97ce40 into main Dec 14, 2023
@bog-walk bog-walk deleted the bog-walk/fix-flaky-joda-test branch December 14, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants