From de244656c8b8a432d33d3fa8e44276345048612e Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Tue, 21 May 2024 10:11:32 -0400 Subject: [PATCH] Fix groupChat test to use longer timeout so it is less likely to fail --- groupChat/receiveRequest_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/groupChat/receiveRequest_test.go b/groupChat/receiveRequest_test.go index 7514b00f0..fc4c7e51f 100644 --- a/groupChat/receiveRequest_test.go +++ b/groupChat/receiveRequest_test.go @@ -8,6 +8,12 @@ package groupChat import ( + "math/rand" + "reflect" + "strings" + "testing" + "time" + "github.com/cloudflare/circl/dh/sidh" "github.com/golang/protobuf/proto" "gitlab.com/elixxir/client/v4/catalog" @@ -15,11 +21,6 @@ import ( "gitlab.com/elixxir/client/v4/e2e/receive" gs "gitlab.com/elixxir/client/v4/groupChat/groupStore" util "gitlab.com/elixxir/client/v4/storage/utility" - "math/rand" - "reflect" - "strings" - "testing" - "time" ) // Tests that the correct group is received from the request. @@ -80,7 +81,7 @@ func TestRequestListener_Hear(t *testing.T) { t.Errorf("receiveRequest() failed to return the expected group."+ "\nexpected: %#v\nreceived: %#v", g, receivedGrp) } - case <-time.NewTimer(5 * time.Millisecond).C: + case <-time.NewTimer(500 * time.Millisecond).C: t.Error("Timed out while waiting for callback.") } } -- GitLab