Many of the faster joins test flakes are due to the homeserver under
test failing to contact Complement homeservers after they have been
torn down. When this happens, subsequent tests can fail if they use a
Complement homeserver that happens to have the same hostname:port as one
which the homeserver under test has previously marked as offline.
Make the homeserver under test leave rooms at the end of each test, so
that it stops trying to contact the Complement homeservers in the room.
Many of the faster joins test flakes are due to the homeserver under test failing to contact Complement homeservers after they have been torn down. When this happens, subsequent tests can fail if they use a Complement homeserver that happens to have the same hostname:port as one which the homeserver under test has previously marked as offline.
Make the homeserver under test leave rooms at the end of each test, so that it stops trying to contact the Complement homeservers in the room.
Signed-off-by: Sean Quah seanq@matrix.org
Reviewable commit by commit.
NB: you can tease out the flakes by forcing Complement to reuse ports whenever possible: