Skip to content

Commit

Permalink
Remove sleeps
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Nov 13, 2023
1 parent 2b4322c commit 999da0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/membership_acls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ func TestCanDecryptMessagesAfterInviteButBeforeJoin(t *testing.T) {
aliceStopSyncing := alice.StartSyncing(t)
defer aliceStopSyncing()

time.Sleep(time.Second) // TODO: find another way to wait until initial sync is done

wantMsgBody := "Message sent when bob is invited not joined"

// Check the room is in fact encrypted
Expand All @@ -158,6 +156,8 @@ func TestCanDecryptMessagesAfterInviteButBeforeJoin(t *testing.T) {
// wait for SS proxy to get it. Only needed when testing Rust TODO FIXME
// Without this, the join will race with sending the msg and you could end up with the
// message being sent POST join, which breaks the point of this test.
// kegan: I think this happens because SendMessage on Rust does not block until a 200 OK
// because it allows for local echo. Can we fix the RustClient?
time.Sleep(time.Second)

// Bob joins the room (via Complement, but it shouldn't matter)
Expand Down

0 comments on commit 999da0f

Please sign in to comment.