Commit da5d5926 authored by Naoki Kambe's avatar Naoki Kambe
Browse files

[trac930]

  - change address for test to 127.0.0.1 due to platform 127.0.0.2 can't be
    assigned
  - remove unnecessary thread.Event.wait()
  - add thread.Event.clear() after thread.Event.wait()
parent 0314c7bb
......@@ -512,13 +512,13 @@ class TestStatsHttpd(unittest.TestCase):
self.assertEqual(
self.stats_httpd.config_handler(
dict(listen_on=[dict(address="127.0.0.2",port=8000)])),
dict(listen_on=[dict(address="127.0.0.1",port=8000)])),
isc.config.ccsession.create_answer(0))
self.assertTrue("listen_on" in self.stats_httpd.config)
for addr in self.stats_httpd.config["listen_on"]:
self.assertTrue("address" in addr)
self.assertTrue("port" in addr)
self.assertTrue(addr["address"] == "127.0.0.2")
self.assertTrue(addr["address"] == "127.0.0.1")
self.assertTrue(addr["port"] == 8000)
if self.ipv6_enabled:
......
......@@ -211,7 +211,6 @@ class TestStats(unittest.TestCase):
# command_handler
statsserver = ThreadingServerManager(MyStats)
statsserver.run()
self.base.boss.server._started.wait()
self.assertEqual(
send_command(
'show', 'Stats',
......
......@@ -53,6 +53,7 @@ class ThreadingServerManager:
def run(self):
self.server._thread.start()
self.server._started.wait()
self.server._started.clear()
# waiting for the server's being ready for listening
time.sleep(TIMEOUT_SEC)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment