diff tests/test-ssh.t @ 37987:45a669bad421

test-ssh: add some flush() to make output deterministic We shouldn't rely on buffering mode/state of file handles.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 25 Mar 2018 16:39:17 +0900
parents 58bbd14b0c62
children e69628f36196
line wrap: on
line diff
--- a/tests/test-ssh.t	Thu May 10 21:08:32 2018 +0900
+++ b/tests/test-ssh.t	Sun Mar 25 16:39:17 2018 +0900
@@ -272,12 +272,14 @@
   $ cat <<EOF > $TESTTMP/badhook
   > import sys
   > sys.stdout.write("KABOOM\n")
+  > sys.stdout.flush()
   > EOF
 
   $ cat <<EOF > $TESTTMP/badpyhook.py
   > import sys
   > def hook(ui, repo, hooktype, **kwargs):
   >     sys.stdout.write("KABOOM IN PROCESS\n")
+  >     sys.stdout.flush()
   > EOF
 
   $ cat <<EOF >> ../remote/.hg/hgrc
@@ -456,6 +458,7 @@
   > def wrappedpush(orig, repo, *args, **kwargs):
   >     res = orig(repo, *args, **kwargs)
   >     repo.ui.write('local stdout\n')
+  >     repo.ui.flush()
   >     return res
   > 
   > def extsetup(ui):