One more attempt at the race
@@ -189,13 +189,13 @@ def test_jupyter_log_history(wandb_init_run, capsys):
files = [c[1][0] for c in fsapi.push.mock_calls]
assert sorted(files) == ['wandb-events.jsonl',
'wandb-history.jsonl', 'wandb-summary.json']
+ # TODO: There's a race here where a thread isn't stopped
+ time.sleep(1)
wandb.log({"resumed": "log"})
new_fsapi = wandb_init_run._jupyter_agent.rm._api._file_stream_api
wandb_init_run.run_manager.test_shutdown()
payloads = {c[1][0]: json.loads(c[1][1])
for c in new_fsapi.push.mock_calls}
- # TODO: There's a race here where a thread isn't stopped above I think
- time.sleep(0.5)
assert payloads["wandb-history.jsonl"]["_step"] == 16
assert payloads["wandb-history.jsonl"]["resumed"] == "log"
