From 8d8994913131bd2e7ca491353545a19055da8ad9 Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 23 Apr 2020 16:48:54 +0300 Subject: [PATCH] increase travis friendliness for new tests --- floodsub_test.go | 4 ++-- validation_test.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/floodsub_test.go b/floodsub_test.go index fe8e251..0719ebb 100644 --- a/floodsub_test.go +++ b/floodsub_test.go @@ -1057,7 +1057,7 @@ func TestPubsubWithAssortedOptions(t *testing.T) { hosts := getNetHosts(t, ctx, 2) psubs := getPubsubs(ctx, hosts, WithMessageIdFn(hashMsgID), - WithPeerOutboundQueueSize(1), + WithPeerOutboundQueueSize(10), WithMessageAuthor(""), WithBlacklist(NewMapBlacklist())) @@ -1072,7 +1072,7 @@ func TestPubsubWithAssortedOptions(t *testing.T) { subs = append(subs, sub) } - time.Sleep(100 * time.Millisecond) + time.Sleep(time.Second) for i := 0; i < 2; i++ { msg := []byte(fmt.Sprintf("message %d", i)) diff --git a/validation_test.go b/validation_test.go index 896f406..bc9d19e 100644 --- a/validation_test.go +++ b/validation_test.go @@ -214,9 +214,9 @@ func TestValidateAssortedOptions(t *testing.T) { hosts := getNetHosts(t, ctx, 10) psubs := getPubsubs(ctx, hosts, - WithValidateQueueSize(1), - WithValidateThrottle(1), - WithValidateWorkers(1)) + WithValidateQueueSize(10), + WithValidateThrottle(10), + WithValidateWorkers(10)) sparseConnect(t, hosts) @@ -255,7 +255,7 @@ func TestValidateAssortedOptions(t *testing.T) { subs2 = append(subs2, sub) } - time.Sleep(100 * time.Millisecond) + time.Sleep(time.Second) for i := 0; i < 10; i++ { msg := []byte(fmt.Sprintf("message %d", i)) @@ -328,7 +328,7 @@ func TestValidateMultitopic(t *testing.T) { subs3 = append(subs2, sub) } - time.Sleep(100 * time.Millisecond) + time.Sleep(time.Second) msg1 := "i am a walrus"