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

Flaky tests #6358

Open
6 of 14 tasks
nazarhussain opened this issue Jan 26, 2024 · 8 comments
Open
6 of 14 tasks

Flaky tests #6358

nazarhussain opened this issue Jan 26, 2024 · 8 comments
Labels
meta-investigate Issues found that require further investigation and may not have a specific resolution/fix scope-testing Issues for adding test coverage, fixing existing tests or testing strategies.

Comments

@nazarhussain
Copy link
Contributor

nazarhussain commented Jan 26, 2024

Describe the bug

There are some flaky tests needed be fixed.

Expected behavior

All tests should behave as stable they could.

Steps to reproduce

  • Run all tests

Additional context

During CI runs on different PRs we found few

Operating system

Linux

Lodestar version or commit hash

unstable

@nazarhussain nazarhussain added meta-bug Issues that identify a bug and require a fix. scope-testing Issues for adding test coverage, fixing existing tests or testing strategies. meta-investigate Issues found that require further investigation and may not have a specific resolution/fix and removed meta-bug Issues that identify a bug and require a fix. labels Jan 26, 2024
@twoeths
Copy link
Contributor

twoeths commented Jan 29, 2024

A lot of failed tests happen with useWorker=true, I think it has something to do with the fact that vitest also run in worker thread
for gossipsub, I suggest to only run on main thread mode for CI in #6368
we could do the same thing in req/resp tests too

I used to be able to stabalize e2e tests in "n-historical" state branch by only use useWorker=false

@nazarhussain
Copy link
Contributor Author

A lot of failed tests happen with useWorker=true, I think it has something to do with the fact that vitest also run in worker thread

For this reason we already run e2e tests with forks not threads.

pool: "forks",

@jeluard
Copy link
Member

jeluard commented Feb 9, 2024

@nflaig
Copy link
Member

nflaig commented Feb 9, 2024

Not directly a sim test error, but somewhat related: Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

This happens since we merged #6410, the CI failed on that PR as well...

@nflaig
Copy link
Member

nflaig commented Feb 27, 2024

Sim merge tests keep getting stuck and time out after 6h since we merged #6344 (as I noted already in the PR), see recent runs on unstable branch (1, 2).

@nflaig
Copy link
Member

nflaig commented Apr 7, 2024

The browser tests keep failing due to different reasons, this one looks like a race condition (failed run)? The file has a test suite defined and it passes most of the time.

@lodestar/utils: ⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯
@lodestar/utils: FAIL test/unit/err.test.ts [ test/unit/err.test.ts ]
@lodestar/utils: Error: No test suite found in file /home/runner/actions-runner/_work/lodestar/lodestar/packages/utils/test/unit/err.test.ts
@lodestar/utils: ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

I would suggest we disable browser tests for now as they don't provide any value like this, and are just annoying to deal with

@nflaig
Copy link
Member

nflaig commented Apr 7, 2024

test/unit/utils/clock.test.ts > util / Clock > getCurrentSlot > 'should return next slot after 11.5s'

Interestingly I have not seen that one in a while, maybe related to updating vitest? Vitest seems to have some internal issues with timings in general and fails to execute tests deterministically..hope they can improve this in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta-investigate Issues found that require further investigation and may not have a specific resolution/fix scope-testing Issues for adding test coverage, fixing existing tests or testing strategies.
Projects
None yet
Development

No branches or pull requests

5 participants