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

e2e tests are unstable #3203

Closed
khassel opened this issue Sep 18, 2023 · 6 comments
Closed

e2e tests are unstable #3203

khassel opened this issue Sep 18, 2023 · 6 comments
Labels

Comments

@khassel
Copy link
Collaborator

khassel commented Sep 18, 2023

No new problem, our e2e test are failing unrelated to the tested code.

Was already discussed in some PR's so I decided to make an issue for this.

My observations:

  • not related to native fetch, was the same with node-fetch before

  • most fails are with node v20 (but not exclusive)

  • seems to be a timing problem, very hard to reproduce locally

  • looks like different tests interfere, maybe the next one is started before the predecessor stopped

  • some strange errors are mocked in tests/e2e/helpers/mock-console.js:

    const mockError = (err) => {
      if (
        err.includes("ECONNREFUSED") ||
        err.includes("ECONNRESET") ||
        err.includes("socket hang up") ||
        err.includes("exports is not defined") ||
        err.includes("write EPIPE") ||
        err.includes("AggregateError") ||
        err.includes("ERR_SOCKET_CONNECTION_TIMEOUT")
      ) {
        jest.fn();
      } else {
        console.dir(err);
      }
    };
    
    global.console = {
      log: jest.fn(),
      dir: console.dir,
      error: mockError,
      warn: console.warn,
      info: jest.fn(),
      debug: console.debug
    };

    So removing mockError here will show these errors and may can lead to the real error

@khassel khassel added the bug label Sep 18, 2023
@bugsounet
Copy link
Contributor

most fails are with node v20 (but not exclusive)

Maybe it's related to node 20 version, this branch is still young

Just for see: Test suite Passed / Failed node v20.x version:

[Pass]
node v20.7.0

[Failed]
node v20.6.1

@khassel
Copy link
Collaborator Author

khassel commented Sep 23, 2023

yes, since running on v20.7.0 it is more stable.

@bugsounet
Copy link
Contributor

this is not the case with v20.8.0

@bugsounet
Copy link
Contributor

Finally, I went back to node v18. Too many strange problems on my Pi4. but oddly less on my dev PC

@sdetweil sdetweil changed the title e2e tests are instable e2e tests are unstable Sep 29, 2024
@sdetweil
Copy link
Collaborator

sdetweil commented Nov 7, 2024

should this be closed, now on 20.9 and up?

@khassel
Copy link
Collaborator Author

khassel commented Nov 7, 2024

I don't think it is really solved, there are still test fails sometimes. But can be closed for now.

@khassel khassel closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants