Skip to content

Commit 3597d2d

Browse files
authored
Drive the stop-before-effects fixture without a competing worker (#10101)
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
1 parent 4d102d7 commit 3597d2d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/test_local_delegation.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,8 @@ def test_a_stop_written_before_the_effects_linearizes_against_them(service, monk
10041004
from loopx.control_plane.collaboration.inbox import _write as write_inbox
10051005

10061006
root, runner = service
1007+
# Drive this worker below so the stop is written before it can execute.
1008+
monkeypatch.setattr(runner, "_spawn", lambda _: None)
10071009
runner.start("analysis", "analysis-race", brief())
10081010
path = runner.path("analysis-race")
10091011
row = _read(path)
@@ -1024,7 +1026,7 @@ def test_a_stop_written_before_the_effects_linearizes_against_them(service, monk
10241026
assert not (root / "runtime" / "replies" / "analysis-race" / "conclusion.json").exists()
10251027
assert not (root / "host-started").exists()
10261028
receipt = runner.stop("analysis-race", execute=True)
1027-
assert receipt["phase"] == "settled" and receipt["status"] == "stopped"
1029+
assert receipt["phase"] == "settled" and receipt["status"] == "stopped", receipt
10281030

10291031

10301032
def held_lease(monkeypatch, row, key):

0 commit comments

Comments
 (0)