view tests/test-bad-pull.t @ 22267:90cf454edd70

cvsps: add two more tiebreakers in cscmp test-convert-cvs.t has been a little flaky for a while now. Add an extra tiebreaker in cscmp so that all the cases in the test will sort reliably. Without this patch, test-convert-cvs.t failed after 346 runs. With this patch, I stopped trying to get it to fail after 615 runs. While not conclusive, that makes me pretty optimistic that this is a working fix.
author Augie Fackler <raf@durin42.com>
date Thu, 21 Aug 2014 10:07:30 -0400
parents 7a9cbb315d84
children 10116463b0b1
line wrap: on
line source

#require serve

#if windows
  $ hg clone http://localhost:$HGPORT/ copy
  abort: * (glob)
  [255]
#else
  $ hg clone http://localhost:$HGPORT/ copy
  abort: error: Connection refused
  [255]
#endif

  $ test -d copy
  [1]

  $ cat > dumb.py <<EOF
  > import BaseHTTPServer, SimpleHTTPServer, os, signal
  > def run(server_class=BaseHTTPServer.HTTPServer,
  >         handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
  >     server_address = ('localhost', int(os.environ['HGPORT']))
  >     httpd = server_class(server_address, handler_class)
  >     open("listening", "w")
  >     httpd.handle_request()
  > run()
  > EOF

  $ python dumb.py 2> log &
  $ P=$!
  $ while [ ! -f listening ]; do sleep 0; done
  $ hg clone http://localhost:$HGPORT/foo copy2
  abort: HTTP Error 404: * (glob)
  [255]
  $ wait $P