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): avoid race between execute and clearContext #3452

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

johnjbarton
Copy link
Contributor

Add a delay in execute to ensure that reload events and clear context events are completed first.
Fixes #3424

@johnjbarton johnjbarton requested a review from kyliau March 25, 2020 17:57
@johnjbarton
Copy link
Contributor Author

nicojs@ please review

@karmarunnerbot
Copy link
Member

Build karma 141 completed (commit 4d3df72d52 by @johnjbarton)

@karmarunnerbot
Copy link
Member

Build karma 140 completed (commit 4d3df72d52 by @johnjbarton)

@AppVeyorBot
Copy link

Build karma 2539 completed (commit 4d3df72d52 by @johnjbarton)

client/karma.js Outdated
clearContext()
}, 0)
// A test could have incorrectly issued a navigate. To clear the context
// we will navigte the iframe. Delay ours to ensure the error from an
Copy link
Collaborator

Choose a reason for hiding this comment

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

navigate (typo) to the iframe

client/karma.js Show resolved Hide resolved
Copy link
Contributor Author

@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.

Sorry for the delay. Had to fix a lot of stuff. I think that if you rebase we can get this in.

Add a delay in execute to ensure that reload events and clear context events are completed first.
Fixes karma-runner#3424
@karmarunnerbot
Copy link
Member

Build karma 336 completed (commit cf45b0c65b by @johnjbarton)

@AppVeyorBot
Copy link

Build karma 2734 completed (commit cf45b0c65b by @johnjbarton)

@karmarunnerbot
Copy link
Member

Build karma 335 completed (commit cf45b0c65b by @johnjbarton)

@johnjbarton johnjbarton merged commit 8bc5b46 into karma-runner:master Aug 10, 2020
karmarunnerbot pushed a commit that referenced this pull request Aug 31, 2020
# [5.2.0](v5.1.1...v5.2.0) (2020-08-31)

### Bug Fixes

* **client:** avoid race between execute and clearContext ([#3452](#3452)) ([8bc5b46](8bc5b46)), closes [#3424](#3424)
* **client:** check in bundled client code into version control ([#3524](#3524)) ([6cd5a3b](6cd5a3b)), closes [/github.com/karma-runner/karma/commit/f5521df7df5cd1201b5dce28dc4e326b1ffc41fd#commitcomment-38967493](https://github.com//github.com/karma-runner/karma/commit/f5521df7df5cd1201b5dce28dc4e326b1ffc41fd/issues/commitcomment-38967493)
* **dependencies:** update dependencies ([#3543](#3543)) ([5db46b7](5db46b7))
* **docs:** Update 03-how-it-works.md ([#3539](#3539)) ([e7cf7b1](e7cf7b1))
* **server:** log error when file loading or preprocessing fails ([#3540](#3540)) ([fc2fd61](fc2fd61))

### Features

* **server:** allow 'exit' listeners to set exit code ([#3541](#3541)) ([7a94d33](7a94d33))
@karmarunnerbot
Copy link
Member

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

devoto13 added a commit to devoto13/karma that referenced this pull request Sep 8, 2020
anthony-redFox pushed a commit to anthony-redFox/karma that referenced this pull request May 16, 2023
…r#3452)

Add a delay in execute to ensure that reload events and clear context events are completed first.
Fixes karma-runner#3424
anthony-redFox pushed a commit to anthony-redFox/karma that referenced this pull request May 16, 2023
# [5.2.0](karma-runner/karma@v5.1.1...v5.2.0) (2020-08-31)

### Bug Fixes

* **client:** avoid race between execute and clearContext ([karma-runner#3452](karma-runner#3452)) ([8bc5b46](karma-runner@8bc5b46)), closes [karma-runner#3424](karma-runner#3424)
* **client:** check in bundled client code into version control ([karma-runner#3524](karma-runner#3524)) ([6cd5a3b](karma-runner@6cd5a3b)), closes [/github.com/karma-runner/karma/commit/f5521df7df5cd1201b5dce28dc4e326b1ffc41fd#commitcomment-38967493](https://github.com//github.com/karma-runner/karma/commit/f5521df7df5cd1201b5dce28dc4e326b1ffc41fd/issues/commitcomment-38967493)
* **dependencies:** update dependencies ([karma-runner#3543](karma-runner#3543)) ([5db46b7](karma-runner@5db46b7))
* **docs:** Update 03-how-it-works.md ([karma-runner#3539](karma-runner#3539)) ([e7cf7b1](karma-runner@e7cf7b1))
* **server:** log error when file loading or preprocessing fails ([karma-runner#3540](karma-runner#3540)) ([fc2fd61](karma-runner@fc2fd61))

### Features

* **server:** allow 'exit' listeners to set exit code ([karma-runner#3541](karma-runner#3541)) ([7a94d33](karma-runner@7a94d33))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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!"
5 participants