fix(test): update run-journal reconnect anchor for the (1/N) template literal

test_error_reconnect_path_can_restore_from_journal anchored on the exact string
setComposerStatus('Reconnecting — but the first status was changed to a template
literal `Reconnecting… (1/${_retryDelays.length})` for the staged-probe counter,
so that single-quoted anchor no longer exists (ValueError: substring not found in
CI shard 2). Re-anchor on the block's stable entry point _reconnectAttempted=true;
(unique in source) and widen the window to 1100 chars; the st.active /
st.replay_available / Restoring stream / _runJournalReplayParams() assertions are
unchanged.
This commit is contained in:
allenliang2022 committed 2026-06-29 01:22:40 +08:00
1 parent 265e176f6c
commit b0d01e492a
1 file changed
+6 -2
+6 -2
View File
@@ -222,8 +222,12 @@ def test_reattach_path_uses_replay_when_status_reports_journal():
def test_error_reconnect_path_can_restore_from_journal():
reconnect_pos = MESSAGES_SRC.index("setComposerStatus('Reconnecting")
block = MESSAGES_SRC[reconnect_pos : reconnect_pos + 900]
# Anchor on the reconnect block's stable entry point rather than the exact
# composer-status string: the first status was changed to a template literal
# `Reconnecting… (1/${_retryDelays.length})` (staged-probe counter), so the
# old single-quoted "setComposerStatus('Reconnecting" anchor no longer exists.
reconnect_pos = MESSAGES_SRC.index("_reconnectAttempted=true;")
block = MESSAGES_SRC[reconnect_pos : reconnect_pos + 1100]
assert "st.active" in block
assert "st.replay_available" in block