test(connectors): assert only on _DeadlockError in the import race test

Gate finding BN21 r1 2c (Medium, flaky): the race snippet's own purge() pops
tools.connectors* from sys.modules while sibling threads are mid-import, so
importlib also raises AttributeError ('NoneType' object has no attribute
'__dict__') for tools.connectors.tool. That is a harness artifact, not the
deadlock, yet the old `!= "KeyError"` filter kept it and the fixed tree went
red intermittently (8/160 runs under 8x parallel load).

Filter on the bug class itself. Measured: HEAD 30/30 green serial and 160/160
under the same load; BASE tools/connectors/__init__.py 30/30 red
(_DeadlockError in every run).
This commit is contained in:
kshitijk4poor
2026-10-03 15:53:19 +05:30
committed by kshitij
parent 27f1e7e401
commit ec07cbee62

View File

@@ -52,7 +52,7 @@ for t in threads:
for t in threads:
t.join(timeout=120)
print("alive", sum(1 for t in threads if t.is_alive()))
print("errors", [e for e in errors if e[1] != "KeyError"])
print("errors", [e for e in errors if e[1] == "_DeadlockError"])
"""