Skip to content

Commit

Permalink
chore: fix test flake with shared workers and correlating on failures (
Browse files Browse the repository at this point in the history
…#28132)

Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
  • Loading branch information
ryanthemanuel and cacieprins committed Oct 26, 2023
1 parent 15f7300 commit 80cc83d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion packages/server/test/integration/http_requests_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ describe('Routes', () => {
this.networkProxy.setPreRequestTimeout(50)
// If this takes longer than the Promise.delay and the prerequest timeout then the second
// call has hit the prerequest timeout which is a problem
this.timeout(150)
this.timeout(900)

nock(this.server.remoteStates.current().origin)
.get('/')
Expand All @@ -1057,6 +1057,7 @@ describe('Routes', () => {

// Wait 100 ms to make sure the request times out
return Promise.delay(100).then(() => {
this.networkProxy.setPreRequestTimeout(1000)
nock(this.server.remoteStates.current().origin)
.get('/')
.once()
Expand Down
10 changes: 5 additions & 5 deletions system-tests/projects/e2e/shared-worker.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// eslint-disable-next-line no-undef
importScripts('/sw.js')

self.addEventListener('connect', (event) => {
self.onconnect = (event) => {
const port = event.ports[0]

port.onmessage = (e) => {
// eslint-disable-next-line no-undef
importScripts('/sw.js')

if (e.data.foo === 'baz') {
port.postMessage({
foo: 'baz2',
})
}
}
})
}
6 changes: 3 additions & 3 deletions system-tests/projects/e2e/web-worker.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line no-undef
importScripts('/ww.js')

onmessage = (e) => {
// eslint-disable-next-line no-undef
importScripts('/ww.js')

if (e.data.foo === 'bar') {
postMessage({
foo: 'bar2',
Expand Down

5 comments on commit 80cc83d

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80cc83d Oct 26, 2023

Choose a reason for hiding this comment

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

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.4/linux-arm64/develop-80cc83d0aabd9545aaaf1cf7c78d1933a463b694/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80cc83d Oct 26, 2023

Choose a reason for hiding this comment

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

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.4/linux-x64/develop-80cc83d0aabd9545aaaf1cf7c78d1933a463b694/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80cc83d Oct 26, 2023

Choose a reason for hiding this comment

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

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.4/darwin-x64/develop-80cc83d0aabd9545aaaf1cf7c78d1933a463b694/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80cc83d Oct 26, 2023

Choose a reason for hiding this comment

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

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.4/win32-x64/develop-80cc83d0aabd9545aaaf1cf7c78d1933a463b694/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 80cc83d Oct 26, 2023

Choose a reason for hiding this comment

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

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.4/darwin-arm64/develop-80cc83d0aabd9545aaaf1cf7c78d1933a463b694/cypress.tgz

Please sign in to comment.