From c7dcfe070f9a643f935c1b65a2da532dfecabf78 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 31 Jul 2020 12:42:37 +0100 Subject: [PATCH] Race fix --- currentstateserver/currentstateserver_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/currentstateserver/currentstateserver_test.go b/currentstateserver/currentstateserver_test.go index 2719e544b..193173906 100644 --- a/currentstateserver/currentstateserver_test.go +++ b/currentstateserver/currentstateserver_test.go @@ -230,6 +230,9 @@ func TestQuerySharedUsers(t *testing.T) { MustWriteOutputEvent(t, producer, mustMakeMembershipEvent(t, "!foo4:bar", "@alice:localhost", "join")) + // we don't know when the server has processed the events + time.Sleep(10 * time.Millisecond) + testCases := []struct { req api.QuerySharedUsersRequest wantRes api.QuerySharedUsersResponse