Closed Bug 1458157 Opened 8 years ago Closed 8 years ago

intermittent test failures in hgext/configwizard/tests/test-wip.t

Categories

(Developer Services :: Mercurial: configwizard, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: glob, Assigned: sheehan)

Details

Attachments

(1 file)

i see the following intermittent failure in hgext/configwizard/tests/test-wip.t. generally takes fewer than 10 attempts to reproduce; occurs regardless of the mercurial version. ./run-tests -j1 --with-hg /Users/byron/dev/vct/_hgdev/version-control-tools/venv/hgdev/mercurials/4.5.2/bin/hg /Users/byron/dev/vct/_hgdev/version-control-tools/hgext/configwizard/tests/test-wip.t Will run 1 non-Docker tests concurrently Running non-Docker Mercurial tests --- /Users/byron/dev/vct/_hgdev/version-control-tools/hgext/configwizard/tests/test-wip.t +++ /Users/byron/dev/vct/_hgdev/version-control-tools/hgext/configwizard/tests/test-wip.t.err @@ -249,17 +249,6 @@ To begin, press the enter/return key. <RETURN> - The "pager" extension transparently redirects command output to a pager - program (like "less") so command output can be more easily consumed - (e.g. output longer than the terminal can be scrolled). - - Please select one of the following for configuring pager: - - 1. Enable pager and configure with recommended settings (preferred) - 2. Enable pager with default configuration - 3. Don't enable pager - - Which option would you like? 1 It is common to want a quick view of changesets that are in progress. The ``hg wip`` command provides such a view. @@ -284,24 +273,6 @@ (Relevant config options: alias.wip, revsetalias.wip, templates.wip) Would you like to install the `hg wip` alias (Yn)? y - Your config file needs updating. - Would you like to see a diff of the changes first (Yn)? y - --- hgrc.old - +++ hgrc.new - @@ -16,5 +16,11 @@ - [experimental] - graphshorten = true - [extensions] - +pager = - [pager] - pager = LESS=FRSXQ less - +attend-help = true - +attend-incoming = true - +attend-outgoing = true - +attend-status = true - +attend-wip = true - - Write changes to hgrc file (Yn)? y #endif @@ -373,13 +344,12 @@ [templates] wip = '{label("wip.branch", if(branches,"{branches} "))}{label(ifeq(graphnode,"x","wip.obsolete","wip.{phase}"),"{rev}:{node|short}")}{label("wip.user", " {author|user}")}{label("wip.tags", if(tags," {tags}"))}{label("wip.tags", if(fxheads," {fxheads}"))}{if(bookmarks," ")}{label("wip.bookmarks", if(bookmarks,bookmarks))}{label(ifcontains(rev, revset("parents()"), "wip.here"), " {desc|firstline}")}' [color] - @@ -17,6 +17,7 @@ + @@ -16,5 +16,6 @@ + [experimental] graphshorten = true [extensions] - pager = +firefoxtree = */hgext/firefoxtree (glob) [pager] pager = LESS=FRSXQ less - attend-help = true Write changes to hgrc file (Yn)? y ERROR: test-wip.t output changed ! Failed test-wip.t: output changed # Ran 1 tests, 0 skipped, 1 failed. python hash seed: 2728463901
Keywords: in-triage
Assignee: nobody → sheehan
Keywords: in-triage
We were writing a fakeversion.py extension with different content. Since Python uses mtimes to detect if a .pyc needs updating, there was a race condition where both fakeversion.py files would be written with the same timestamp and `hg` invocation would use the .pyc from the first file version. Derp. This commit writes out separate .py files to force no .pyc bytecode reuse. We also clean up the test to use fake versions everywhere. This makes things simpler.
Comment on attachment 8974016 [details] configwizard: remove .pyc race condition from test-wip.t; r?sheehan Connor Sheehan [:sheehan] has approved the revision. https://phabricator.services.mozilla.com/D1202
Attachment #8974016 - Flags: review+
Pushed by cosheehan@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/e18221d5739e configwizard: remove .pyc race condition from test-wip.t; r=sheehan
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Turns out the error was a race condition where a leftover .pyc file was loaded into the test, which changed the output and caused the test to fail. I verified the test is stabilized by running 100 times in a loop, with passing results each time. Thanks to :gps for getting to the bottom of this!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: