server replay: keep --kill active

This commit is contained in:
Maximilian Hils 2016-04-09 16:47:05 -07:00
parent 4d16bb8cb6
commit dcdee7dc46
3 changed files with 6 additions and 16 deletions

View File

@ -789,8 +789,6 @@ class FlowMaster(controller.Master):
self.kill_nonreplay = kill
def stop_server_playback(self):
if self.server_playback.exit:
self.shutdown()
self.server_playback = None
def do_server_playback(self, flow):
@ -827,7 +825,8 @@ class FlowMaster(controller.Master):
if self.server_playback:
stop = (
self.server_playback.count() == 0 and
self.state.active_flow_count() == 0
self.state.active_flow_count() == 0 and
not self.kill_nonreplay
)
exit = self.server_playback.exit
if stop:

View File

@ -68,6 +68,7 @@ class TestDumpMaster:
m.handle_clientconnect(f.client_conn)
m.handle_serverconnect(f.server_conn)
m.handle_request(f)
if not f.error:
f.response = HTTPResponse.wrap(netlib.tutils.tresp(content=content))
f = m.handle_response(f)
m.handle_clientdisconnect(f.client_conn)

View File

@ -904,16 +904,6 @@ class TestFlowMaster:
assert not fm.do_server_playback(r)
assert fm.do_server_playback(tutils.tflow())
fm.start_server_playback(
pb,
False,
[],
True,
False,
None,
False,
None,
False)
q = queue.Queue()
fm.tick(q, 0)
assert fm.should_exit.is_set()