Index: Lib/bsddb/test/test_replication.py =================================================================== --- Lib/bsddb/test/test_replication.py (revision 77827) +++ Lib/bsddb/test/test_replication.py (working copy) @@ -119,24 +119,18 @@ timeout = time.time()+60 while (time.time()> sys.stderr, \ - "XXX - windows bsddb replication fails on windows and is skipped" - print >> sys.stderr, "XXX - Please see issue #3892" - # It also fails irregularly on other platforms, and again the - # rest of the tests pass. Since bsddb support is unmaintained, and - # is gone in py3k, we just emit a warning instead of a test failure - # so as to improve buildbot stability. - elif time.time()>timeout: - print >> sys.stderr, \ - "XXX - timeout before startup confirmed, see issue #3892." + # self.client_startupdone does not always get set to True within + # the timeout. On windows this may be a deep issue, on other + # platforms it is likely just a timing issue, especially on slow + # virthost buildbots (see issue 3892 for more). Even though + # the timeout triggers, the rest of this test method usually passes + # (but not all of it always, see below). So we just note the + # timeout on stderr and keep soldering on. + if time.time()>timeout: + import sys + print >> sys.stderr, ("XXX: timeout happened before" + "startup was confirmed - see issue 3892") + startup_timeout = True d = self.dbenvMaster.repmgr_site_list() self.assertEquals(len(d), 1) @@ -194,6 +188,14 @@ txn.commit() if v==None : time.sleep(0.02) + # If startup did not happen before the timeout above, then this test + # sometimes fails. This happens randomly, which causes buildbot + # instability, but all the other bsddb tests pass. Since bsddb3 in the + # stdlib is currently not getting active maintenance, and is gone in + # py3k, we just skip the end of the test in that case. + if time.time()>=timeout and startup_timeout: + self.skipTest("replication test skipped due to random failure, " + "see issue 3892") self.assertTrue(time.time()