Commit 479ab13
Hold paused activities open until assertion observes paused=true
Replace the "treat gone as success" workaround with explicit synchronization
between pause_and_assert and the test activities it pauses. The helper
registers a threading.Event keyed by activity_id before calling pause_activity;
heartbeat_activity and sync_heartbeat_activity wait on that event after
catching their pause-induced cancellation. This keeps the activity in the
pending list until the helper has observed paused=true, eliminating the race
without weakening the assertion.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fbeaeec commit 479ab13
2 files changed
Lines changed: 46 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
268 | 291 | | |
269 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
270 | 298 | | |
271 | 299 | | |
272 | 300 | | |
| |||
276 | 304 | | |
277 | 305 | | |
278 | 306 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
292 | 320 | | |
293 | 321 | | |
294 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
7782 | 7784 | | |
7783 | 7785 | | |
7784 | 7786 | | |
| 7787 | + | |
7785 | 7788 | | |
7786 | 7789 | | |
7787 | 7790 | | |
| |||
7801 | 7804 | | |
7802 | 7805 | | |
7803 | 7806 | | |
| 7807 | + | |
7804 | 7808 | | |
7805 | 7809 | | |
7806 | 7810 | | |
| |||
0 commit comments