Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Fixes #266: Stop sessions if exception thrown when resetting#267

Open
dsnopek wants to merge 1 commit intoBehat:masterfrom
dsnopek:chrome-crash-266
Open

Fixes #266: Stop sessions if exception thrown when resetting#267
dsnopek wants to merge 1 commit intoBehat:masterfrom
dsnopek:chrome-crash-266

Conversation

@dsnopek
Copy link
Copy Markdown

@dsnopek dsnopek commented Jan 18, 2017

A fix for #266 that works in my testing with a sporadic (but pretty reliable) Chrome crash

@stof
Copy link
Copy Markdown
Member

stof commented Jan 18, 2017

I'm wondering whether we should handle it in Mink itself. What do you think @aik099 ?

@stof
Copy link
Copy Markdown
Member

stof commented Jan 18, 2017

btw, this could allow stopping only the session which was broken, instead of stopping all sessions, in case you have several ones

try {
$this->mink->resetSessions();
}
catch (\Exception $e) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's better to handle DriverException or similar Mink exception class. If I'm not mistaken then it would be possible to get actual failed session out of it and stop exactly it.

@aik099
Copy link
Copy Markdown

aik099 commented Jan 18, 2017

I'm wondering whether we should handle it in Mink itself. ...

@stof , something like session self-restart on failed stop? Like new parameter of Session::stop method, e.g. $restartOnFailure = false?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants