Patchwork D10244: tests: ask any chg instance to terminate before looking at sqlite dbs

login
register
mail settings
Submitter phabricator
Date March 20, 2021, 2:10 a.m.
Message ID <differential-rev-PHID-DREV-re6ynldlaiam2ia7bdo4-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48560/
State Superseded
Headers show

Comments

phabricator - March 20, 2021, 2:10 a.m.
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  There are spurious errors in CI where the database is still locked, so
  force the daemon to quit to get deterministic behavior. Since the kill
  command itself is racy, also sleep 2s to give the server time to wake up
  and exit.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10244

AFFECTED FILES
  tests/test-wireproto-exchangev2-shallow.t

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-wireproto-exchangev2-shallow.t b/tests/test-wireproto-exchangev2-shallow.t
--- a/tests/test-wireproto-exchangev2-shallow.t
+++ b/tests/test-wireproto-exchangev2-shallow.t
@@ -176,6 +176,10 @@ 
   updating the branch cache
   (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob)
 
+#if chg
+  $ hg --kill-chg-daemon
+  $ sleep 2
+#endif
   $ sqlite3 -line client-shallow-1/.hg/store/db.sqlite << EOF
   > SELECT id, path, revnum, node, p1rev, p2rev, linkrev, flags FROM filedata ORDER BY id ASC;
   > EOF
@@ -347,6 +351,10 @@ 
   updating the branch cache
   (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob)
 
+#if chg
+  $ hg --kill-chg-daemon
+  $ sleep 2
+#endif
   $ sqlite3 -line client-shallow-narrow-1/.hg/store/db.sqlite << EOF
   > SELECT id, path, revnum, node, p1rev, p2rev, linkrev, flags FROM filedata ORDER BY id ASC;
   > EOF