mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-21 06:20:05 -06:00
Fix unstable testPostBrokerLoginFlowWithOTP_bruteForceEnabled test (#33969)
Closes #33549
Signed-off-by: Martin Kanis <mkanis@redhat.com>
(cherry picked from commit a8a5c96510)
This commit is contained in:
@@ -399,13 +399,12 @@ public class AssertEvents implements TestRule {
|
||||
List<String> presentedEventTypes = new LinkedList<>();
|
||||
for (int i = 0 ; i < 25 ; i++) {
|
||||
EventRepresentation event = fetchNextEvent(seconds);
|
||||
if (event == null) {
|
||||
Assert.fail("Did not find the event of expected type " + expected.getType() +". Events present: " + presentedEventTypes);
|
||||
}
|
||||
if (expected.getType().equals(event.getType())) {
|
||||
return assertEvent(event);
|
||||
} else {
|
||||
presentedEventTypes.add(event.getType());
|
||||
if (event != null) {
|
||||
if (expected.getType().equals(event.getType())) {
|
||||
return assertEvent(event);
|
||||
} else {
|
||||
presentedEventTypes.add(event.getType());
|
||||
}
|
||||
}
|
||||
}
|
||||
Assert.fail("Did not find the event of expected type " + expected.getType() +". Events present: " + presentedEventTypes);
|
||||
|
||||
Reference in New Issue
Block a user