Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium: increase default startup timeout to 60 seconds #4357

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,7 @@ public class BrowserWebDriverContainer<SELF extends BrowserWebDriverContainer<SE

public BrowserWebDriverContainer() {
super();
final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy()
.withRegEx(
".*(RemoteWebDriver instances should connect to|Selenium Server is up and running|Started Selenium Standalone).*\n"
)
.withStartupTimeout(Duration.of(15, ChronoUnit.SECONDS));

this.waitStrategy =
new WaitAllStrategy()
.withStrategy(logWaitStrategy)
.withStrategy(new HostPortWaitStrategy())
.withStartupTimeout(Duration.of(15, ChronoUnit.SECONDS));
this.waitStrategy = getDefaultWaitStrategy();

this.withRecordingFileFactory(new DefaultRecordingFileFactory());
}
Expand All @@ -134,17 +124,7 @@ public BrowserWebDriverContainer(DockerImageName dockerImageName) {
super(dockerImageName);
// we assert compatibility with the chrome/firefox/edge image later, after capabilities are processed

final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy()
.withRegEx(
".*(RemoteWebDriver instances should connect to|Selenium Server is up and running|Started Selenium Standalone).*\n"
)
.withStartupTimeout(Duration.of(15, ChronoUnit.SECONDS));

this.waitStrategy =
new WaitAllStrategy()
.withStrategy(logWaitStrategy)
.withStrategy(new HostPortWaitStrategy())
.withStartupTimeout(Duration.of(15, ChronoUnit.SECONDS));
this.waitStrategy = getDefaultWaitStrategy();

this.withRecordingFileFactory(new DefaultRecordingFileFactory());

Expand Down Expand Up @@ -453,6 +433,19 @@ public SELF withRecordingFileFactory(RecordingFileFactory recordingFileFactory)
return self();
}

private WaitStrategy getDefaultWaitStrategy() {
final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy()
.withRegEx(
".*(RemoteWebDriver instances should connect to|Selenium Server is up and running|Started Selenium Standalone).*\n"
)
.withStartupTimeout(Duration.of(60, ChronoUnit.SECONDS));

return new WaitAllStrategy()
.withStrategy(logWaitStrategy)
.withStrategy(new HostPortWaitStrategy())
.withStartupTimeout(Duration.of(60, ChronoUnit.SECONDS));
}

public enum VncRecordingMode {
SKIP,
RECORD_ALL,
Expand Down