Skip to content

Commit ce57df6

Browse files
authored
Fix double nested lambda in getWithTimeout (#4470)
This fixes #4469, `getWithTimeou`t did only apply to the outer lambda, which returned immediately (the inner lambda). Instead, wrap getWithTimeout itself inside a lambda.
1 parent 820161f commit ce57df6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/selenium/src/main/java/org/testcontainers/containers/BrowserWebDriverContainer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,8 @@ public int getPort() {
281281
@Override
282282
protected void containerIsStarted(InspectContainerResponse containerInfo) {
283283
driver = Unreliables.retryUntilSuccess(30, TimeUnit.SECONDS,
284-
Timeouts.getWithTimeout(10, TimeUnit.SECONDS,
285-
() ->
286-
() -> new RemoteWebDriver(getSeleniumAddress(), capabilities)));
284+
() -> Timeouts.getWithTimeout(10, TimeUnit.SECONDS,
285+
() -> new RemoteWebDriver(getSeleniumAddress(), capabilities)));
287286

288287
if (vncRecordingContainer != null) {
289288
LOGGER.debug("Starting VNC recording");

0 commit comments

Comments
 (0)