Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollovati committed Jun 20, 2024
1 parent b531535 commit 349252b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;

import org.junit.Assert;
Expand Down Expand Up @@ -102,12 +103,15 @@ public void testHistory() throws URISyntaxException {
waitForUrlChange(baseUrl.resolve("."));
}

private final AtomicInteger counter = new AtomicInteger();

private void waitForUrlChange(URI expectedUrl) {
int i = counter.incrementAndGet();
waitUntil(d -> {
try {
URI currentUrl = getCurrentUrl();
System.out.println("========== Expected URL: " + expectedUrl
+ ", Current URL: " + currentUrl);
System.out.println("========== " + i + " :: Expected URL: "
+ expectedUrl + ", Current URL: " + currentUrl);
return expectedUrl.equals(currentUrl);
} catch (URISyntaxException e) {
return false;
Expand Down

0 comments on commit 349252b

Please sign in to comment.