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

fix(client): prevent race condition in clear context #3425

Closed

Conversation

nicojs
Copy link
Contributor

@nicojs nicojs commented Feb 17, 2020

Fix #3424

@karmarunnerbot
Copy link
Member

Build karma 91 completed (commit e93c6c177d by @nicojs)

@karmarunnerbot
Copy link
Member

Build karma 90 completed (commit e93c6c177d by @nicojs)

@AppVeyorBot
Copy link

Build karma 2489 completed (commit e93c6c177d by @nicojs)

@nicojs nicojs force-pushed the fix/race-condition-in-clear-context branch from 4f47465 to 4767154 Compare March 2, 2020 06:59
@nicojs nicojs marked this pull request as ready for review March 2, 2020 07:00
@karmarunnerbot
Copy link
Member

Build karma 110 completed (commit 620637fb91 by @nicojs)

@AppVeyorBot
Copy link

Build karma 2508 completed (commit 620637fb91 by @nicojs)

@karmarunnerbot
Copy link
Member

Build karma 109 completed (commit 620637fb91 by @nicojs)

Copy link
Contributor

@johnjbarton johnjbarton left a comment

Choose a reason for hiding this comment

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

Thanks, nice.

} else {
iframe.src = policy.createURL(url)
}
}

/**
* Schedules te next execution after current context is cleared
Copy link
Contributor

Choose a reason for hiding this comment

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

the

this.scheduleExecution = function (execution) {
if (reloadingContext) {
// A context reload is in progress. Wait for it to complete before executing.
this.scheduledExecution = execution
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this one character member name difference is hard to read, could we use eg executionScheduled?

* Schedules te next execution after current context is cleared
* (or is directly started if context is currently not being cleared)
* @param execution {() => void}
* @see https://github.com/karma-runner/karma/issues/3424
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also add

Fixes #3424 

to the PR description.

@johnjbarton
Copy link
Contributor

I think #3597 will fix this, but time will tell.

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.

Race condition results in error "Some of your tests did a full page reload!"
4 participants