From 6d5c32ad4b6078a72b73b695981faec36ef917c0 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 15 Mar 2011 17:21:35 +1300 Subject: Fix hang on shutdown. --- test/test_flow.py | 4 ++-- test/tutils.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test_flow.py b/test/test_flow.py index 91e3f5f4..a3fa48d7 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -1,6 +1,6 @@ import Queue from cStringIO import StringIO -from libmproxy import console, proxy, filt, flow +from libmproxy import console, proxy, filt, flow, controller import tutils import libpry @@ -442,7 +442,7 @@ class uFlowMaster(libpry.AutoTree): assert fm.do_server_playback(tutils.tflow()) q = Queue.Queue() fm.tick(q) - assert fm._shutdown + assert controller.exit def test_stickycookie(self): s = flow.State() diff --git a/test/tutils.py b/test/tutils.py index ec2c71a8..ae9dea27 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -59,6 +59,7 @@ class TestMaster(controller.Master): class ProxyThread(threading.Thread): def __init__(self, port, testq): self.tmaster = TestMaster(port, testq) + controller.exit = False threading.Thread.__init__(self) def run(self): -- cgit v1.2.3