ci: reduce Python test overhead and Windows latency (#6357)
* test: merge overlapping semantic contract coverage Consolidate the six confirmed NAN-310 overlap groups while preserving replay, usage, generation kwargs, archive metadata, inspect fields, and subagent crash/redelivery assertions. * test: lighten history seeds and layer runner progress rules * ci: defer test storage setup and record phase timings Close each listener-owned binary bridge before waiting for its TCP server; retain active upload and undecided-connection regressions. Avoid consuming readiness twice and run the repository import scan once in its static gate. NAN-310. * test: scope filesystem mocks and observe consumed socket prefixes * test: publish subprocess readiness files atomically * ci: isolate external tool discovery and use three Windows workers
This commit is contained in:
1 parent
743c51e81f
commit
f284749d2f
28 files changed
+518
-448
No files matched your search
@@ -161,11 +161,12 @@ def test_write_text_atomic_fsyncs_file_and_parent_directory(
|
||||
def fake_fsync(fd: int) -> None:
|
||||
fsync_calls.append(fd)
|
||||
|
||||
monkeypatch.setattr(helpers.os, "fsync", fake_fsync)
|
||||
monkeypatch.setattr(helpers.os, "open", lambda path, flags: 12345)
|
||||
monkeypatch.setattr(helpers.os, "close", lambda fd: closed_fds.append(fd))
|
||||
with monkeypatch.context() as patch:
|
||||
patch.setattr(helpers.os, "fsync", fake_fsync)
|
||||
patch.setattr(helpers.os, "open", lambda path, flags: 12345)
|
||||
patch.setattr(helpers.os, "close", lambda fd: closed_fds.append(fd))
|
||||
|
||||
_write_text_atomic(target, '{"approved": {}}')
|
||||
_write_text_atomic(target, '{"approved": {}}')
|
||||
|
||||
assert target.read_text(encoding="utf-8") == '{"approved": {}}'
|
||||
assert len(fsync_calls) == 2
|
||||
@@ -183,10 +184,11 @@ def test_write_text_atomic_keeps_file_when_directory_fsync_is_unsupported(
|
||||
def fake_open(path, flags):
|
||||
raise OSError("directory fsync unsupported")
|
||||
|
||||
monkeypatch.setattr(helpers.os, "fsync", lambda fd: fsync_calls.append(fd))
|
||||
monkeypatch.setattr(helpers.os, "open", fake_open)
|
||||
with monkeypatch.context() as patch:
|
||||
patch.setattr(helpers.os, "fsync", lambda fd: fsync_calls.append(fd))
|
||||
patch.setattr(helpers.os, "open", fake_open)
|
||||
|
||||
_write_text_atomic(target, '{"pending": {}}')
|
||||
_write_text_atomic(target, '{"pending": {}}')
|
||||
|
||||
assert target.read_text(encoding="utf-8") == '{"pending": {}}'
|
||||
assert len(fsync_calls) == 1
|
||||
|
||||
Reference in new issue
Block a user