Parcourir la source

context: attempt to deflake TestLayersTimeout with timer padding.

Fixes #11512.

Change-Id: Iaf98ec25fb16a2409c1ff7d110afa6477267d3e1
Reviewed-on: https://go-review.googlesource.com/13643
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Sameer Ajmani il y a 10 ans
Parent
commit
96feaeba77
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      context/context_test.go

+ 1 - 1
context/context_test.go

@@ -536,7 +536,7 @@ func testLayers(t *testing.T, seed int64, testTimeout bool) {
 	if testTimeout {
 		select {
 		case <-ctx.Done():
-		case <-time.After(timeout + timeout/10):
+		case <-time.After(timeout + 100*time.Millisecond):
 			errorf("ctx should have timed out")
 		}
 		checkValues("after timeout")