Skip to content

Gif test case is flaky #6089

Closed
Closed
@davepagurek

Description

@davepagurek

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

main branch

Web browser and version

Github Actions

Operating System

N/A

Steps to reproduce this

Sometimes automated tests fair on this test case and have to be rerun:

return wait(110);
}).then(function() {
myp5.image(img, 0, 0);
assert.equal(img.gifProperties.displayIndex, 1);

It seems like the issue is that we use a timer to wait for the gif to move to the next frame. However, the gif will only update when p5 draws again and updates its internal elapsed time. The test case adds an extra 10s to the timer it waits for to give enough time for the draw to happen, but this isn't super reliable, so sometimes the draw hasn't happened and the test fails.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions