Skip to content

Modify Selenium container startup detection#351

Merged
rnorth merged 4 commits intomasterfrom
fix-selenium-3.x-startup-issue
Jun 3, 2017
Merged

Modify Selenium container startup detection#351
rnorth merged 4 commits intomasterfrom
fix-selenium-3.x-startup-issue

Conversation

@rnorth
Copy link
Copy Markdown
Member

@rnorth rnorth commented May 30, 2017

... using alternative readiness string observed in v3.x of Selenium containers.

It seems that somewhere along the line the string that the selenium containers use to signal readiness has changed. This commit fixes that issue by allowing either string to be detected. The test tries two tag versions with differing outputs.

FYI @bsideup @kiview

@rnorth rnorth requested a review from bsideup May 30, 2017 19:15

@Test
public void testAdditionalStartupString() {
BrowserWebDriverContainer chrome = new BrowserWebDriverContainer("selenium/standalone-chrome-debug:" + tag)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use try-with-resources here

* Simple test to check that readiness detection works correctly across major versions of the containers.
*/
@RunWith(Parameterized.class)
public class Selenium3xTest extends BaseWebDriverContainerTest {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove "extends BaseWebDriverContainerTest" because we don't use anything from it

public BrowserWebDriverContainer() {
this.waitStrategy = new LogMessageWaitStrategy()
.withRegEx(".*RemoteWebDriver instances should connect to.*\n")
.withRegEx(".*Selenium Server is up and running.*\n")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this String available in all versions? Because I thought you wanted something like

".*(RemoteWebDriver instances should connect to)|(Selenium Server is up and running).*\n"

@rnorth rnorth merged commit 0569e0b into master Jun 3, 2017
@rnorth rnorth deleted the fix-selenium-3.x-startup-issue branch June 3, 2017 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants