From 2882c793e23457bedf3b2955c1a57fc9fcdb086d Mon Sep 17 00:00:00 2001 From: Jeromy Date: Sun, 17 May 2015 14:08:05 -0700 Subject: [PATCH] add a distribution test with the rebroadcast delay disabled --- exchange/bitswap/bitswap_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/exchange/bitswap/bitswap_test.go b/exchange/bitswap/bitswap_test.go index 6548472c9..803bcd223 100644 --- a/exchange/bitswap/bitswap_test.go +++ b/exchange/bitswap/bitswap_test.go @@ -120,6 +120,18 @@ func TestLargeFile(t *testing.T) { PerformDistributionTest(t, numInstances, numBlocks) } +func TestLargeFileNoRebroadcast(t *testing.T) { + rbd := rebroadcastDelay.Get() + rebroadcastDelay.Set(time.Hour * 24 * 365 * 10) // ten years should be long enough + if testing.Short() { + t.SkipNow() + } + numInstances := 10 + numBlocks := 100 + PerformDistributionTest(t, numInstances, numBlocks) + rebroadcastDelay.Set(rbd) +} + func TestLargeFileTwoPeers(t *testing.T) { if testing.Short() { t.SkipNow()