Commit Graph

10 Commits

Author SHA1 Message Date
Matt Mackall
11be5cc27c tests: replace exit 80 with #require 2014-08-06 11:43:59 -05:00
Pierre-Yves David
fe79a3c664 tests: prevent test-hup from hanging forever if the transaction does not start
If the transaction fails to start because of some programing errors, the test
would stay stuck in this while loop forever.

We now added a basic safeguard that abort the loop if nothing happen in 10
seconds. 10 seconds sounds enough to let the server catch up and open a
transaction.
2014-04-02 00:01:21 -07:00
Jim Hague
77587a4c7a tests: avoid test-hup hanging on AIX
test-hup hangs on AIX. Under ksh89 on AIX (the default shell),

echo Hello; while [ ! -s not-there ]; do true; done

produces no output while the loop executes. Replacing 'true' with 'sleep 0'
fixes, as does using a less broken shell. ksh93 is fine.

Update check-code.py to look for this, and make same change in test-serve.t.
In fact test-serve works fine, probably because of additional commands between
echo and the loop, but that's a subtlety not easy to test for.
2012-04-05 12:31:21 +01:00
Matt Mackall
2be8f7711a tests: avoid zombie lockup with test-hup
The 'while kill -0' recipe can cause a livelock if the process we're waiting
to die is a normal child process. If it becomes a zombie that the shell
doesn't reap (shell bug?), it will continue to be able to accept
signals. So instead, we just wait(1).
2012-04-02 16:46:58 -05:00
Matt Mackall
668dad5779 tests: make test-hup more race-proof
We need to wait until a journal exists AND is non-empty before
aborting a transaction to get stable output. We move the kill wait
outside the fifo block to avoid potential deadlock.
2012-04-02 16:04:07 -05:00
Matt Mackall
41dc46b131 tests: remove sleep/startup/shutdown races from test-hup 2012-03-28 12:02:38 -05:00
Pierre-Yves David
75d76cce5b phases: add rollback support 2011-11-07 12:27:25 +01:00
Mads Kiilerich
8415df7277 tests: use 'hghave serve' to guard tests that requires serve daemon management 2011-11-07 03:24:53 +01:00
Alexander Solovyov
6240007914 fix bookmarks rollback behavior
Before this patch undo.bookmarks was created on bookmarks write and
not with other transaction-related files. There were two issues: first
is that if you have changed bookmarks few times after a transaction
happened, rollback will give you a state which can point to
non-existing revision. Second is that if you have not changed
bookmarks after a transaction, rollback will touch your state anyway.

This change also adds `localrepo._writejournal` method, which can be
used by other extensions to save their transaction-related backup in
right time.
2011-05-01 13:07:00 +02:00
Matt Mackall
6df5dbf1c0 tests: unify test-hup 2010-09-26 13:41:32 -05:00