Skip to content

Commit 6f41799

Browse files
authored
Deflake leave-via-kick/ban faster joins tests (#628)
We need to allow the homeserver under test to finish making requests to the Complement homeserver before tearing it down, otherwise the homeserver under test may mark the hostname:port combination as down and refuse to contact it in subsequent tests. Signed-off-by: Sean Quah <[email protected]>
1 parent 646d35f commit 6f41799

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/federation_room_join_partial_state_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3822,6 +3822,10 @@ func TestPartialStateJoin(t *testing.T) {
38223822

38233823
// Cleanup.
38243824
psjResult.FinishStateRequest()
3825+
// Dirty hack to allow the homeserver under test to finish making requests to the
3826+
// Complement homeserver as part of syncing the full state.
3827+
psjResult.AwaitStateIdsRequest(t)
3828+
time.Sleep(time.Second / 2)
38253829
})
38263830

38273831
t.Run("can be triggered by remote ban", func(t *testing.T) {
@@ -3880,6 +3884,10 @@ func TestPartialStateJoin(t *testing.T) {
38803884

38813885
// Cleanup.
38823886
psjResult.FinishStateRequest()
3887+
// Dirty hack to allow the homeserver under test to finish making requests to the
3888+
// Complement homeserver as part of syncing the full state.
3889+
psjResult.AwaitStateIdsRequest(t)
3890+
time.Sleep(time.Second / 2)
38833891
})
38843892
})
38853893

0 commit comments

Comments
 (0)