-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Description
Most appropriate sub-area of p5.js?
- AccessibilityColorCore/Environment/RenderingDataDOMEventsImageIOMathTypographyUtilitiesWebGLBuild processUnit testingInternationalizationFriendly errorsOther (specify if possible)To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
p5.js version
2.0.2
Web browser and version
Chrome, 137.0.7151.55
Operating system
MacOS Sequoia 15.1.1
Steps to reproduce this
Steps:
- Run
npx vitest run
. - The
tint should be reset after draw loop
test in thetint() in WEBGL mode
suite (path:test/unit/webgl/p5.RendererGL.js
) is flaky and intermittently times out with the error shown below.
Snippet:
FAIL |unit| test/unit/webgl/p5.RendererGL.js > p5.RendererGL > tint() in WEBGL mode > tint should be reset after draw loop
Error: Test timed out in 1000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
Screenshot:

I have not been able to analyse root cause yet or attempt a fix.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
welcome commentedon Jun 3, 2025
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
davepagurek commentedon Jun 4, 2025
Is this flaky in some way, e.g. if you run just that one test file with
npm run test test/unit/webgl/p5.RendererGL.js
does it still fail, or is it only when run in combination with all the tests?sophyphile commentedon Jun 5, 2025
Hey Dave, yes definitely flaky. It hasn't failed yet on my side when running it independently, and it fails intermittently when running it in combination with other tests.
davepagurek commentedon Jun 6, 2025
Another thing to test could be parallelism. It looks like by default vitest runs multiple test files in parallel, and on some systems WebGL tests might be too heavy to do that within the 1s timeout? So some things to test could be:
sophyphile commentedon Jun 10, 2025
Hi Dave, I'll go ahead and test both scenarios. I've regularly seen this particular test fail more often during repeated test runs, as system load progressively increases. That said, I've also occasionally observed failures when launching a first test run on a quiet machine (albeit in parallel with other tests).
I shall test without parallelism first to see if that solves the issue. Otherwise, I suspect increasing the test timeout will help. I'll report back on my findings!