failWorkerForTesting method
Implementation
void failWorkerForTesting(int workerIndex) {
final worker = _workerByIndex(workerIndex);
if (worker == null) return;
worker.failAll(
const AsyncError(
code: AsyncErrorCode.workerTerminated,
message: 'Worker isolate terminated',
),
);
_clearWorkerAffinity(worker.index);
_drainBackpressureWaiters();
}