Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Strilanc committed Aug 7, 2024
1 parent 4269062 commit 88c1e4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions glue/sample/src/sinter/_collection/_collection_manager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_manager():
_assert_drain_queue(manager.worker_states[0].input_queue, [
(
'change_job',
(t0, sinter.CollectionOptions(max_errors=100)),
(t0, sinter.CollectionOptions(max_errors=100), 100),
),
(
'accept_shots',
Expand All @@ -91,7 +91,7 @@ def test_manager():
('compute_strong_id', t0),
(
'change_job',
(t1, sinter.CollectionOptions(max_errors=10000000)),
(t1, sinter.CollectionOptions(max_errors=10000000), 10000000),
),
(
'accept_shots',
Expand All @@ -102,7 +102,7 @@ def test_manager():
('compute_strong_id', t1),
(
'change_job',
(t1, sinter.CollectionOptions(max_errors=10000000)),
(t1, sinter.CollectionOptions(max_errors=10000000), 10000000),
),
(
'accept_shots',
Expand Down Expand Up @@ -279,9 +279,9 @@ def test_manager():
('return_shots', (t0.strong_id(), 66666666)),
])
_assert_drain_queue(manager.worker_states[1].input_queue, [
('change_job', (t0, sinter.CollectionOptions(max_errors=100))),
('change_job', (t0, sinter.CollectionOptions(max_errors=100), 100)),
])
_assert_drain_queue(manager.worker_states[2].input_queue, [
('return_shots', (t1.strong_id(), 1000000)),
('change_job', (t0, sinter.CollectionOptions(max_errors=100))),
('change_job', (t0, sinter.CollectionOptions(max_errors=100), 100)),
])
6 changes: 3 additions & 3 deletions glue/sample/src/sinter/_collection/_collection_worker_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_worker_stop():
)
handler.expected_task = t0

_put_wait_not_empty(inp, ('change_job', (t0, sinter.CollectionOptions(max_errors=100_000_000))))
_put_wait_not_empty(inp, ('change_job', (t0, sinter.CollectionOptions(max_errors=100_000_000), 100_000_000)))
assert worker.process_messages() == 1
_assert_drain_queue(out, [('changed_job', 5, (t0.strong_id(),))])

Expand Down Expand Up @@ -105,7 +105,7 @@ def test_worker_skip_work():
json_metadata={'a': 3},
)
handler.expected_task = t0
_put_wait_not_empty(inp, ('change_job', (t0, sinter.CollectionOptions(max_errors=100_000_000))))
_put_wait_not_empty(inp, ('change_job', (t0, sinter.CollectionOptions(max_errors=100_000_000), 100_000_000)))
assert worker.process_messages() == 1
_assert_drain_queue(out, [('changed_job', 5, (t0.strong_id(),))])

Expand Down Expand Up @@ -161,7 +161,7 @@ def test_worker_finish_work():
json_metadata={'a': 3},
)
handler.expected_task = ta
_put_wait_not_empty(inp, ('change_job', (ta, sinter.CollectionOptions(max_errors=100_000_000))))
_put_wait_not_empty(inp, ('change_job', (ta, sinter.CollectionOptions(max_errors=100_000_000), 100_000_000)))
_put_wait_not_empty(inp, ('accept_shots', (ta.strong_id(), 10000)))
assert worker.process_messages() == 2
_assert_drain_queue(out, [
Expand Down

0 comments on commit 88c1e4e

Please sign in to comment.