From 491b3173d7d27e118c8dca618411eb5f6c19d473 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 10 Mar 2014 15:05:36 -0700 Subject: [PATCH] Shut down the gearman server last in tests In particular, shut it down after all its clients have been shut down. In some cases, it was shut down early enough that the RPC listener was able to attempt to reconnect to it and trigger a rare condition in gear that would cause the reconnection thread to hang. Change-Id: I1dc5d77484eabf9fa43f16ae8295ddb4df4af056 --- tests/test_scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index 4a4d6de00c..0399ca578d 100755 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -896,7 +896,6 @@ class TestScheduler(testtools.TestCase): self.merge_server.join() self.merge_client.stop() self.worker.shutdown() - self.gearman_server.shutdown() self.gerrit.stop() self.timer.stop() self.sched.stop() @@ -907,6 +906,7 @@ class TestScheduler(testtools.TestCase): self.webapp.join() self.rpc.stop() self.rpc.join() + self.gearman_server.shutdown() threads = threading.enumerate() if len(threads) > 1: self.log.error("More than one thread is running: %s" % threads)