[PATCH] test-logtoprocess: fix flaky test

Jun Wu quark at fb.com
Thu Feb 16 13:49:22 EST 2017


Excerpts from Martin von Zweigbergk's message of 2017-02-16 10:40:09 -0800:
> On Thu, Feb 16, 2017 at 10:34 AM, Jun Wu <quark at fb.com> wrote:
> > # HG changeset patch
> > # User Jun Wu <quark at fb.com>
> > # Date 1487270039 28800
> > #      Thu Feb 16 10:33:59 2017 -0800
> > # Node ID 070d9b1d8c2528e8c247b5bcaeb69aea509619a1
> > # Parent  6e6a461b5b60dc48a9e49cab2f3994b1345531fc
> > # Available At https://bitbucket.org/quark-zju/hg-draft 
> > #              hg pull https://bitbucket.org/quark-zju/hg-draft  -r 070d9b1d8c25
> > test-logtoprocess: fix flaky test
> >
> > Commands started by logtoprocess are running asynchronously. To be able to
> > test the output, we need to block and wait for the output.
> >
> > The patch adds "| head -n 1" to the "hg log" command so its "asynchronous"
> > output is waited and can be tested reliably.
> 
> Why not "cat"? Maybe also add a comment in the test case explaining
> why it's needed?

Good advice. Will send a V2.


More information about the Mercurial-devel mailing list