fix: inspect native ICDB occupancy before bounded repair
This commit is contained in:
1 parent
cb1326688b
commit
e14a864b37
17 files changed
+617
-153
No files matched your search
@@ -88,12 +88,11 @@ def test_restarted_export_copy_can_release_only_after_fresh_proof(export_case, t
|
||||
|
||||
|
||||
def test_maintenance_idle_guard_recognizes_new_exporter_names(monkeypatch):
|
||||
import win32com.client
|
||||
from cbb_refresh_verify.maintenance_entry import assert_native_idle
|
||||
def query(sql):
|
||||
assert 'icdb2ascii.exe' in sql.casefold() and 'icdbnetserver.exe' in sql.casefold()
|
||||
return [SimpleNamespace(ProcessId=123456, Name='icdb2ascii.exe', CommandLine='export')]
|
||||
monkeypatch.setattr(win32com.client, 'GetObject', lambda *_: SimpleNamespace(ExecQuery=query))
|
||||
def query(names):
|
||||
assert 'icdb2ascii.exe' in [n.casefold() for n in names] and 'icdbnetserver.exe' in [n.casefold() for n in names]
|
||||
return [{'pid': 123456, 'name': 'icdb2ascii.exe', 'command': 'export'}]
|
||||
monkeypatch.setattr('cbb_refresh_verify.owner_probe.query_owners', query)
|
||||
with pytest.raises(ValueError, match='MAINTENANCE_OWNER_ACTIVE'): assert_native_idle()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user