feat(tui): add 16 race condition reliability tests (bd-3fjk)
- 4 stale response tests: issue list, dashboard, MR list, cross-screen isolation - 4 SQLITE_BUSY error handling tests: toast display, nav preservation, idempotent toasts, error-then-success - 7 cancel race tests: cancel/resubmit, rapid 5-submit sequence, key isolation, complete removes handle, stale completion no-op, stuck loading prevention, cancel_all - 1 issue detail stale guard test - Added active_cancel_token() method to TaskSupervisor for test observability
This commit is contained in:
@@ -232,6 +232,14 @@ impl TaskSupervisor {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the cancel token for an active task, if any.
|
||||
///
|
||||
/// Used in tests to verify cooperative cancellation behavior.
|
||||
#[must_use]
|
||||
pub fn active_cancel_token(&self, key: &TaskKey) -> Option<Arc<CancelToken>> {
|
||||
self.active.get(key).map(|h| h.cancel.clone())
|
||||
}
|
||||
|
||||
/// Number of currently active tasks.
|
||||
#[must_use]
|
||||
pub fn active_count(&self) -> usize {
|
||||
|
||||
Reference in New Issue
Block a user