Fix unstable testPostBrokerLoginFlowWithOTP_bruteForceEnabled test
Closes #33549 Signed-off-by: Martin Kanis <mkanis@redhat.com>
This commit is contained in:
parent
8fb5ecaa6c
commit
a8a5c96510
1 changed files with 7 additions and 8 deletions
|
@ -399,13 +399,12 @@ public class AssertEvents implements TestRule {
|
||||||
List<String> presentedEventTypes = new LinkedList<>();
|
List<String> presentedEventTypes = new LinkedList<>();
|
||||||
for (int i = 0 ; i < 25 ; i++) {
|
for (int i = 0 ; i < 25 ; i++) {
|
||||||
EventRepresentation event = fetchNextEvent(seconds);
|
EventRepresentation event = fetchNextEvent(seconds);
|
||||||
if (event == null) {
|
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);
|
||||||
if (expected.getType().equals(event.getType())) {
|
} else {
|
||||||
return assertEvent(event);
|
presentedEventTypes.add(event.getType());
|
||||||
} else {
|
}
|
||||||
presentedEventTypes.add(event.getType());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Assert.fail("Did not find the event of expected type " + expected.getType() +". Events present: " + presentedEventTypes);
|
Assert.fail("Did not find the event of expected type " + expected.getType() +". Events present: " + presentedEventTypes);
|
||||||
|
|
Loading…
Reference in a new issue