From 4efcc3004950e5a26b078c68cac0d09c563cccf4 Mon Sep 17 00:00:00 2001 From: Ferenc Szabo Date: Wed, 20 Feb 2019 15:15:25 +0100 Subject: [PATCH] swarm/network: skip flaky TestGetSubscriptionsRPC on Travis w/ -race Test fails a lot with something like: streamer_test.go:1332: Real subscriptions and expected amount don't match; real: 0, expected: 20 --- swarm/network/stream/streamer_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/swarm/network/stream/streamer_test.go b/swarm/network/stream/streamer_test.go index e92ee37834..755b745373 100644 --- a/swarm/network/stream/streamer_test.go +++ b/swarm/network/stream/streamer_test.go @@ -21,12 +21,15 @@ import ( "context" "errors" "fmt" + "os" "strconv" "strings" "sync" "testing" "time" + "github.com/ethereum/go-ethereum/swarm/testutil" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" @@ -1178,6 +1181,11 @@ stream registration, then tests that there are subscriptions. */ func TestGetSubscriptionsRPC(t *testing.T) { + if testutil.RaceEnabled && os.Getenv("TRAVIS") == "true" { + t.Skip("flaky with -race on Travis") + // Note: related ticket https://github.com/ethersphere/go-ethereum/issues/1234 + } + // arbitrarily set to 4 nodeCount := 4 // run with more nodes if `longrunning` flag is set