Skip to content

Commit

Permalink
Fix a CI flake (#94)
Browse files Browse the repository at this point in the history
We need to consume the `Failure` in `test_error`, otherwise subsequent
tests will fail if the garbage collector runs during them.

Signed-off-by: Sean Quah <seanq@matrix.org>
  • Loading branch information
squahtx authored Mar 30, 2023
1 parent 6f8b382 commit 633c48e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ def test_error(self):
self.body.error(excp)
self.wait_for_thread()

self.assertTrue(deferred.called)
self.assertIsInstance(deferred.result, Failure)
self.failureResultOf(deferred, Exception)

def wait_for_thread(self):
"""Wait for something to call `callFromThread` and advance reactor
Expand Down

0 comments on commit 633c48e

Please sign in to comment.