test(durable): diagnose missing readiness registration

This commit is contained in:
pingqiu committed 2026-11-24 08:34:45 -08:00
1 parent 1c9364e6e0
commit a8a2c0b66d
1 file changed
+5 -1
@@ -44,7 +44,11 @@ func attachWriteSchedule(t *testing.T, readyAt time.Duration, refuse bool) {
done := make(chan outcome, 1)
start := time.Now()
go func() { n, err := b.Write(context.Background(), 4096, next); done <- outcome{n, err} }()
<-waiting
select {
case <-waiting:
case r := <-done:
t.Fatalf("write completed without waiting for attachment: n=%d err=%v", r.n, r.err)
}
synctest.Wait()
select {
case r := <-done: