Skip to content
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

test_intl: resolve test flakiness by using integer nanosecond timestamps during file modification detection #11435

Merged

Conversation

jayaddison
Copy link
Contributor

Feature or Bugfix

  • Bugfix

Purpose

Detail

  • The flaky test assertions relate to the detection of modified files during application builds; and it seems to be message catalog files (.mo) that are relevant.
  • Timestamp detection had been using floating-point seconds-since-the-epoch.
  • Based on a small sample size of testing from Testing: pr 11392 in combination with: pr 11426, pr 11432, and a revert of bug 440 jayaddison/sphinx#3, I believe that integer-based nanoseconds-since-the-epoch may be more reliable (but I'm not 100% confident).
  • At the same time, revert commit 718993a that I believe should be unnecessary -- and maybe-cause-related -- simplifying the code and retrieving the current-time as nanoseconds-since-epoch.

Relates

@picnixz

This comment was marked as outdated.

@jayaddison

This comment was marked as outdated.

@picnixz

This comment was marked as outdated.

@jayaddison

This comment was marked as outdated.

@picnixz

This comment was marked as outdated.

@jayaddison

This comment was marked as outdated.

@picnixz

This comment was marked as outdated.

@jayaddison

This comment was marked as outdated.

@AA-Turner AA-Turner merged commit ecc8613 into sphinx-doc:master Jul 20, 2023
@AA-Turner
Copy link
Member

Thanks @jayaddison!

A

@AA-Turner
Copy link
Member

https://github.com/sphinx-doc/sphinx/actions/runs/5615685910/job/15216466568

A test failure on test_gettext_dont_rebuild_mo...

FAILED tests/test_intl.py::test_gettext_dont_rebuild_mo - AssertionError: assert 1 == 0
 +  where 1 = <function test_gettext_dont_rebuild_mo.<locals>.get_number_of_update_targets at 0x0000020DF2DD83C0>(<SphinxTestApp buildername='dummy'>)
= 1 failed, 1821 passed, 23 skipped, 5 xfailed, 28 xpassed in 212.44s (0:03:32) =

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2023
@jayaddison jayaddison deleted the issue-11232/flaky-gettext-test-fixup branch September 14, 2023 13:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seemingly random CI failures of tests/test_intl.py::test_gettext_dont_rebuild_mo with Windows
3 participants