Skip to content

Commit aee5180

Browse files
committed
checkf or ac change instead
1 parent bdefeda commit aee5180

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

docker/mongodb-kubernetes-tests/tests/authentication/replica_set_scram_sha_256_connectivity.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,12 @@ def test_user_cannot_authenticate_with_incorrect_password(self, replica_set: Mon
133133
@mark.e2e_replica_set_scram_sha_256_user_connectivity
134134
class TestCanChangePassword(KubernetesTester):
135135
def test_user_can_authenticate_with_new_password(self, namespace: str, replica_set: MongoDB):
136-
initial_tester = replica_set.get_automation_config_tester()
137-
initial_version = initial_tester.automation_config.get("version", 0)
136+
ac_version = replica_set.get_automation_config_tester().automation_config["version"]
138137

139138
new_password = "my-new-password7"
140139
update_secret(namespace, PASSWORD_SECRET_NAME, {"password": new_password})
141140

142-
def ac_updated() -> bool:
143-
try:
144-
tester = replica_set.get_automation_config_tester()
145-
current_version = tester.automation_config.get("version", 0)
146-
return current_version > initial_version
147-
except Exception:
148-
return False
149-
150-
wait_until(ac_updated, timeout=600)
141+
wait_until(lambda: replica_set.get_automation_config_tester().reached_version(ac_version + 1), timeout=800)
151142

152143
replica_set.tester().assert_scram_sha_authentication(
153144
password=new_password,

0 commit comments

Comments
 (0)