t.Logf(" First serious error: %v",seriousErrors[0])
}
iflen(transientErrors)>0{
t.Logf(" First transient error: %v",transientErrors[0])
}
}
}
// Allow up to 50% error rate for concurrent stress testing
// This tests that the system handles concurrent load gracefully
iferrorRate>0.5{
t.Errorf("Concurrent operations error rate too high: %.1f%% (>50%%). System may be unstable under load.",errorRate*100)
// STRICT CONCURRENCY TESTING: Use much lower error rate thresholds
// Serious errors (race conditions, deadlocks, etc.) should be near zero
ifseriousErrorRate>0.01{// Max 1% serious error rate
t.Errorf("❌ Serious error rate too high: %.1f%% (>1%%). This indicates potential race conditions, deadlocks, or other concurrency bugs that must be fixed.",seriousErrorRate*100)
}elseiferrorRate>0.05{// Max 5% total error rate (including transient)
t.Errorf("❌ Total error rate too high: %.1f%% (>5%%). While some transient errors are acceptable, this rate suggests system instability under concurrent load.",errorRate*100)
}elseiflen(errorList)>0{
}elseiflen(errorList)>0{
t.Logf("✅ Concurrent operations completed with acceptable error rate: %.1f%%",errorRate*100)