Skip to content

Commit

Permalink
Update AT assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
usmansaleem committed Jan 14, 2025
1 parent dc13031 commit 76dbde1
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,12 @@ public void publicKeysAreRemovedAfterReloadDefault(final KeyType keyType) {
// reload is async ... assert that the key is removed
Awaitility.await()
.atMost(5, SECONDS)
.until(
() -> signer.callApiPublicKeys(keyType).jsonPath().<List<String>>get("."),
containsInAnyOrder(keys[0]));
.untilAsserted(
() -> {
final List<String> publicKeysList =
signer.callApiPublicKeys(keyType).jsonPath().getList(".");
assertThat(publicKeysList).containsOnly(keys[0]);
});
}

@ParameterizedTest
Expand All @@ -188,9 +191,12 @@ public void publicKeysNotRemovedAfterReloadWithKeepStaleKeysTrue(final KeyType k
// reload is async ... assert that the keys are not removed
Awaitility.await()
.atMost(5, SECONDS)
.until(
() -> signer.callApiPublicKeys(keyType).jsonPath().<List<String>>get("."),
containsInAnyOrder(keys));
.untilAsserted(
() -> {
final List<String> publicKeysList =
signer.callApiPublicKeys(keyType).jsonPath().getList(".");
assertThat(publicKeysList).containsExactlyInAnyOrder(keys);
});
}

@ParameterizedTest
Expand Down

0 comments on commit 76dbde1

Please sign in to comment.