···415415 if err != nil {
416416 t.Fatalf("EvictStalePendingStateRecords: %v", err)
417417 }
418418- if evicted != 1 {
419419- t.Fatalf("only the stale orphan must be evicted, got %d want 1", evicted)
418418+ if evicted != 2 {
419419+ t.Fatalf("both stale rows must be evicted regardless of subject presence, got %d want 2", evicted)
420420 }
421421422422 var remaining int
423423 if err := d.QueryRow(`select count(*) from pending_state_records`).Scan(&remaining); err != nil {
424424 t.Fatalf("count: %v", err)
425425 }
426426- if remaining != 2 {
427427- t.Fatalf("the fresh orphan and the stale row with a live subject must survive, got %d want 2", remaining)
426426+ if remaining != 1 {
427427+ t.Fatalf("only the fresh row must survive the TTL sweep, got %d want 1", remaining)
428428 }
429429}