diff --git a/node-tools/internal/runtime/state_counter_test.go b/node-tools/internal/runtime/state_counter_test.go index cd18788..0a47db0 100644 --- a/node-tools/internal/runtime/state_counter_test.go +++ b/node-tools/internal/runtime/state_counter_test.go @@ -122,6 +122,9 @@ func TestTwoWritersIncrementingOneCounterOnTheBusLoseNoUpdate(t *testing.T) { if string(e.Value) != "2000" || len(seen) != 2*each { t.Fatalf("the counter ended at %s with %d numbers handed out, not 2000: an increment was lost", e.Value, len(seen)) } + if lost[0]+lost[1] == 0 { + t.Fatal("the two writers never collided: the test proved nothing about contention") + } t.Logf("2000 increments, %d writes lost to the other writer and tried again", lost[0]+lost[1]) }