HomePhabricator

tests: handle case in test-remotefilelog-clone.t where output is out of order

Authored by swhitaker.

Description

tests: handle case in test-remotefilelog-clone.t where output is out of order

test-remotefilelog-clone.t is flaky, and fails sporadically as follows:

   $ hg clone --noupdate ssh://user@dummy/shallow full
   streaming all changes
+  abort: unexpected response from remote server: empty string
   remote: abort: Cannot clone from a shallow repo to a full repo.
-  abort: unexpected response from remote server: empty string
   [255]

The issue happens because the line starting "abort" and the line starting
"remote: abort" come from different processes, and there's no way to
guarantee the order in which they are output.

This change attempts to address the issue by capturing the output of the
local process and examining it separately.

Test Plan:
rt test-remotefilelog-clone.t

Differential Revision: https://phab.mercurial-scm.org/D1279