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

port in use flakey tests #7747

Open
cdrage opened this issue Jun 19, 2024 · 2 comments
Open

port in use flakey tests #7747

cdrage opened this issue Jun 19, 2024 · 2 comments
Assignees
Labels
area/tests 🚦 kind/bug 🐞 Something isn't working

Comments

@cdrage
Copy link
Contributor

cdrage commented Jun 19, 2024

Is your enhancement related to a problem? Please describe

Getting a lot of flakey tests on e2e lately:

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  src/plugin/util/port.spec.ts > return valid port range
Error: Port 9002 is already in use.
 ❯ Server.<anonymous> src/plugin/util/port.ts:68:18
     66|       .on('error', (error: NodeJS.ErrnoException) => {
     67|         if (error.code === 'EADDRINUSE') {

Error: Error: Port 9002 is already in use.
 ❯ Server.<anonymous> src/plugin/util/port.ts:68:18
 ❯ Server.emit ../../node:events:519:28
 ❯ emitErrorNT ../../node:net:1925:8


     68|           reject(new Error(`Port ${port} is already in use.`));
       |                  ^
     69|         } else if (error.code === 'EACCES') {
     70|           reject(new Error('Operation require administrative privilege…
 ❯ Server.emit ../../node:events:519:28
 ❯ emitErrorNT ../../node:net:1925:8

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

 Test Files  1 failed | 68 passed (69)
      Tests  1 failed | 908 passed (909)
   Start at  20:33:57
   Duration  16.39s (transform 2.32s, setup 14ms, collect 7.60s, tests 24.42s, environment 22ms, prepare 6.78s)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

With regards to port being in use.

Describe the solution you'd like

Flakey test maybe using a different non-privileged port? Unsure.

Describe alternatives you've considered

No response

Additional context

@cbr7 @odockal @ScrewTSW

@cdrage cdrage added kind/enhancement ✨ Issue for requesting an improvement kind/bug 🐞 Something isn't working and removed kind/enhancement ✨ Issue for requesting an improvement labels Jun 19, 2024
@cbr7
Copy link
Contributor

cbr7 commented Jun 19, 2024

@cdrage are you sure this is an e2e test? Because it doesn't look like it to me.

@deboer-tim
Copy link
Collaborator

@cdrage are you sure this is an e2e test? Because it doesn't look like it to me.

Agreed, it is not e2e. I thought there were some recent changes to try to improve this but can't find it atm, so targeting for next sprint to make sure we look at it given the number of times it is failing recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests 🚦 kind/bug 🐞 Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

6 participants