Private
Public Access
feat(directives): add rule-statement header to 33-40 of 66 v1.md files
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# Replace time.sleep(N) with a poll loop on get_value or wait_for_event
|
||||
|
||||
#### Anti-Pattern: `push_event` + `time.sleep(N)` + `assert` is a guaranteed race (Added 2026-06-10)
|
||||
|
||||
The pattern `push_event(...)` → `time.sleep(N)` → `assert` is a guaranteed race condition in batched runs. The first time you write this, the test passes in isolation because the sleep happens to be long enough. Then it lands in the batched run, the subprocess is busier, the sleep is no longer long enough, and the assert fires before the GUI render loop has processed the event.
|
||||
|
||||
Reference in New Issue
Block a user