Commit 7d2003c
fix(cortex-common): fix flaky signal_safety and cwd_guard tests (#478)
The tests were failing intermittently due to shared mutable state
(static atomic variables and current working directory) being modified
by multiple tests running in parallel.
Fixes:
- Added serial_test dependency to cortex-common dev-dependencies
- Added #[serial] attribute to all signal_safety tests to prevent
parallel execution of tests that use global signal handling state
- Added #[serial] attribute to all cwd_guard tests to prevent
parallel execution of tests that modify the current working directory
- Fixed test_cleanup_guard by separating guard unwrap from assertion
to keep the guard alive while testing lock exclusivity
Co-authored-by: Droid Agent <droid@factory.ai>1 parent 34beb21 commit 7d2003c
4 files changed
Lines changed: 62 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
| 313 | + | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
| |||
326 | 328 | | |
327 | 329 | | |
328 | 330 | | |
| 331 | + | |
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
| |||
341 | 344 | | |
342 | 345 | | |
343 | 346 | | |
| 347 | + | |
344 | 348 | | |
345 | 349 | | |
346 | 350 | | |
| |||
359 | 363 | | |
360 | 364 | | |
361 | 365 | | |
| 366 | + | |
362 | 367 | | |
363 | 368 | | |
364 | 369 | | |
| |||
373 | 378 | | |
374 | 379 | | |
375 | 380 | | |
| 381 | + | |
376 | 382 | | |
377 | 383 | | |
378 | 384 | | |
| |||
385 | 391 | | |
386 | 392 | | |
387 | 393 | | |
| 394 | + | |
388 | 395 | | |
389 | 396 | | |
390 | 397 | | |
| |||
399 | 406 | | |
400 | 407 | | |
401 | 408 | | |
| 409 | + | |
402 | 410 | | |
403 | 411 | | |
404 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| |||
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
| 217 | + | |
214 | 218 | | |
215 | 219 | | |
216 | 220 | | |
| |||
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| 236 | + | |
232 | 237 | | |
233 | 238 | | |
234 | 239 | | |
235 | 240 | | |
236 | 241 | | |
237 | 242 | | |
238 | 243 | | |
239 | | - | |
| 244 | + | |
| 245 | + | |
240 | 246 | | |
241 | 247 | | |
242 | 248 | | |
243 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
244 | 253 | | |
245 | 254 | | |
246 | 255 | | |
| |||
251 | 260 | | |
252 | 261 | | |
253 | 262 | | |
| 263 | + | |
254 | 264 | | |
255 | 265 | | |
256 | 266 | | |
| |||
0 commit comments