Skip to content

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Oct 30, 2020

Description

Start one shared instance of chromedriver and quit it at the end. This removes the need to check for driver connection at the end of the test, which seems to be leaving sockets that are not fully closed.

Related Issues

Fixes #69421

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Oct 30, 2020
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla google-cla bot added the cla: yes label Oct 30, 2020
}
print('Stopping chromedriver');
_chromeDriver.process.kill();
while (await _isChromeDriverRunning()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My assumption is that pinging the chromedriver while it's shutting down is what's triggering the issue in the client socket implementation, so removing the need to wait for chromedriver to shut down should also 🤞 fix the flakiness.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

Still LGTM

].map(_withChromeDriver).toList();
];
await _ensureChromeDriverIsRunning();
await _selectIndexedSubshard(tests, kWebLongRunningTestShardCount);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion:Shall we add a comment explaining why we shutdown?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure? All our tests try to shutdown processes they start. It's like tearDown. If you can think of something that would explain something special about chromedriver, I'd be happy to add it. LMK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flake in long running web integration tests: connection reset by peer

3 participants