frac ctx - skip time tests in travis
Juan Batiz-Benet committed
Dec 25, 2014 at 14:23 UTC
5999ae8d0dd0837bc0f252a48f51190c98002143
1 file changed
+8
util/ctx/fracctx_test.go
+8
@@ -1,6 +1,7 @@
1
package ctxutil
2
3
import (
4
+ "os"
5
"testing"
6
"time"
7
@@ -9,6 +10,10 @@ import (
10
11
// this test is on the context tool itself, not our stuff. it's for sanity on ours.
12
func TestDeadline(t *testing.T) {
13
+ if os.Getenv("TRAVIS") == "true" {
14
+ t.Skip("timeouts don't work reliably on travis")
15
+ }
16
+
17
ctx, _ := context.WithTimeout(context.Background(), 5*time.Millisecond)
18
19
select {
@@ -37,6 +42,9 @@ func TestDeadlineFractionForever(t *testing.T) {
42
}
43
44
func TestDeadlineFractionHalf(t *testing.T) {
45
+ if os.Getenv("TRAVIS") == "true" {
46
+ t.Skip("timeouts don't work reliably on travis")
47
+ }
48
49
ctx1, _ := context.WithTimeout(context.Background(), 10*time.Millisecond)
50
ctx2, _ := WithDeadlineFraction(ctx1, 0.5)