Skip to content

Commit

Permalink
test: Reuse global retry strategy for autodiscover tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Cederstrand committed May 17, 2024
1 parent 8559eb9 commit 0b7962b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_autodiscover.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def setUp(self):
super().setUp()

# Enable retries, to make tests more robust
Autodiscovery.INITIAL_RETRY_POLICY = FaultTolerance(max_wait=5)
Autodiscovery.INITIAL_RETRY_POLICY = self.retry_policy
AutodiscoverProtocol.RETRY_WAIT = 5

# Each test should start with a clean autodiscover cache
Expand Down Expand Up @@ -218,6 +218,7 @@ def test_autodiscover_failure(self):
).discover()

def test_failed_login_via_account(self):
Autodiscovery.INITIAL_RETRY_POLICY = FaultTolerance(max_wait=2) # We retry on 401's. Fail faster.
with self.assertRaises(AutoDiscoverFailed):
Account(
primary_smtp_address=self.account.primary_smtp_address,
Expand Down

0 comments on commit 0b7962b

Please sign in to comment.