stable ordering of test output

Jun Wu quark at fb.com
Fri Mar 3 19:37:54 EST 2017


Excerpts from Danek Duvall's message of 2017-03-03 14:45:56 -0800:
> I frequently get failures like this:
> 
>     --- .../mercurial.hg/tests/test-bundle2-exchange.t
>     +++ .../mercurial.hg/tests/test-bundle2-exchange.t.err
>     @@ -1042,11 +1042,11 @@
>        $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh
>        requesting all changes
>        adding changesets
>     -  remote: abort: incompatible Mercurial client; bundle2 required
>     -  remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient )
>        transaction abort!
>        rollback completed
>        abort: stream ended unexpectedly (got 0 bytes, expected 4)
>     +  remote: abort: incompatible Mercurial client; bundle2 required
>     +  remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient )
>        [255]
>      
>        $ cat > bundle2onlyserver/.hg/hgrc << EOF
> 
>     ERROR: test-bundle2-exchange.t output changed
> 
> It's usually fairly consistent, at least for a period of time, and then it
> goes away.  Presumably it's some sort of fairly stable timing issue, and
> possibly unique to the environment I'm running in (at least, I assume that
> the official tests aren't showing this).
> 
> I could patch the tests locally to reorder the lines, but if it's really an
> environmental issue, then that's guaranteed to work consistently even for
> me.
> 
> Is this (ever? frequently?) an issue for anyone else?

Yes. We have seen this on our OSX tests. I guess it's "select()" returning
different things.

The fix would be pretty straightforward while figuring out the root cause
(what race condition it is) needs time.

> I can't think of any particularly satisfying solution to this, other than
> perhaps separating the remote lines from the local lines, and comparing
> each of those independently.  Would that make sense?
> 
> Thanks,
> Danek


More information about the Mercurial-devel mailing list