exceptions tests passing

This commit is contained in:
fawce
2012-08-07 13:16:42 -04:00
parent 5aba8bfc28
commit 804bcb4e0c
3 changed files with 72 additions and 89 deletions
+4 -5
View File
@@ -65,10 +65,10 @@ def drain_zipline(test, zipline):
assert test.ctx, "method expects a valid zmq context"
assert test.zipline_test_config, "method expects a valid test config"
assert isinstance(test.zipline_test_config, dict)
assert test.zipline_test_config['results_socket'], \
assert test.zipline_test_config['results_socket_uri'], \
"need to specify a socket address for logs/perf/risk"
test.receiver = create_receiver(
test.zipline_test_config['results_socket'],
test.zipline_test_config['results_socket_uri'],
test.ctx
)
# Bind and connect are asynch, so allow time for bind before
@@ -76,13 +76,12 @@ def drain_zipline(test, zipline):
time.sleep(1)
# start the simulation
zipline.simulate(blocking=False)
zipline.simulate(blocking=True)
output, transaction_count = drain_receiver(test.receiver)
# some processes will exit after the message stream is
# finished. We block here to avoid collisions with subsequent
# ziplines.
for process in zipline.sim.subprocesses:
process.join()
zipline.join()
return output, transaction_count