Skip to content

Commit

Permalink
Add waitForLedgerTimeToSync()
Browse files Browse the repository at this point in the history
  • Loading branch information
sappenin committed Nov 19, 2024
1 parent 7166cec commit 33048b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
import java.security.KeyStore;
import java.time.Duration;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
Expand Down Expand Up @@ -268,7 +269,7 @@ protected Finality scanForFinality(

protected <T> T scanForResult(Supplier<T> resultSupplier, Predicate<T> condition) {
return given()
.atMost(Durations.ONE_MINUTE)
.atMost(Duration.of(15, ChronoUnit.SECONDS))
.pollInterval(POLL_INTERVAL)
.await()
.until(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class RippledContainer {
* No-args constructor.
*/
public RippledContainer() {
rippledContainer = new GenericContainer<>("rippleci/rippled:2.2.0-rc3")
rippledContainer = new GenericContainer<>("rippleci/rippled:2.2.0")
.withCreateContainerCmdModifier((Consumer<CreateContainerCmd>) (cmd) ->
cmd.withEntrypoint("/opt/ripple/bin/rippled"))
.withCommand("-a --start --conf /config/rippled.cfg")
Expand Down Expand Up @@ -194,5 +194,6 @@ public HttpUrl getBaseUri() {
public void acceptLedger() {
assertContainerStarted();
LEDGER_ACCEPTOR.accept(this);
waitForLedgerTimeToSync();
}
}

0 comments on commit 33048b0

Please sign in to comment.