test/apps/basics is non-deterministic
See original GitHub issueDescribe the bug I’ve encountered this twice now modifying unrelated files on two different branches.
Logs
CI logs
> test-basics@0.0.2 test /home/runner/work/kit/kit/test/apps/basics
> node test
dev
dev [snowpack] ! building dependencies...
[snowpack] ✔ dependencies ready! [1.09s]
http://localhost:3001 • http://10.1.0.4:3001
Server started.
• ✘ • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • (101 / 102)
FAIL dev "announces client-side navigation [js]"
Expected values to be deeply equal: (equal)
++Navigated·to·b (Expected)
-- (Actual)
^^^^^^^^^^^^^^
at assert (file:///home/runner/work/kit/kit/node_modules/.pnpm/uvu@0.6.0-next.1/node_modules/uvu/assert/index.mjs:31:8)
at Module.equal (file:///home/runner/work/kit/kit/node_modules/.pnpm/uvu@0.6.0-next.1/node_modules/uvu/assert/index.mjs:43:2)
at file:///home/runner/work/kit/kit/test/apps/basics/src/routes/accessibility/__tests__.js:41:11
at async Object.handler (file:///home/runner/work/kit/kit/test/runner.js:113:7)
at async Number.runner (file:///home/runner/work/kit/kit/node_modules/.pnpm/uvu@0.6.0-next.1/node_modules/uvu/dist/index.mjs:78:5)
at async Module.exec (file:///home/runner/work/kit/kit/node_modules/.pnpm/uvu@0.6.0-next.1/node_modules/uvu/dist/index.mjs:132:33)
at async runner (file:///home/runner/work/kit/kit/test/runner.js:180:2)
To Reproduce
Unknown. It’s some sort of race condition in the basics
test.
Expected behavior Deterministic behavior.
Additional context
First encountered in #402, then in #403. It’s most likely related to the fact that the test involves an await sleep(50)
:
Strongly related to #213.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Nondeterministic algorithm - Wikipedia
In computer programming, a nondeterministic algorithm is an algorithm that, even for the same input, can exhibit different behaviors on different runs, ...
Read more >Before and after hooks for routing · Issue #552 · sveltejs/kit
Describe the bug onMount is not fired on page change, if the actual page component doesn't change. This is all routes which contain ......
Read more >nondeterministic automaton in nLab
This will give the classical definition as a non-deterministic state-based system and then show how to turn that form into the coalgebraic form....
Read more >Difference between Deterministic and Non ... - GeeksforGeeks
The non-deterministic algorithms can show different behaviors for the same input on different execution and there is a degree of randomness to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And the tests were never flaky again, the end
Farewell, angry red cross, I hope I never see you again.