Summary: | Packages_spec.ts is failing randomly | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Chris Cormack <chris> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | pedro.amorim, victor |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36012 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 25551 |
Description
Jonathan Druart
2023-05-30 09:09:58 UTC
Unable to reproduce locally. I may be wrong but this looks like one of those "happens once every full moon" test failures. (In reply to Pedro Amorim from comment #1) > I may be wrong but this looks like one of those "happens once every full > moon" test failures. Yes, hence the "randomly" in the bug title ;) > Unable to reproduce locally.
Depending on the machine the failure probability can be drastically different. My laptop that is showing it's age (2012 CPU) has 0% probability of running all the cypress tests successfully all in a row. I usually have two or three files failing. And then by running them again individually, I can expect to have a success by running them 3 or 5 times for the one or two that fails easily.
So I can easily tests patches for flaky tests [1]. Best would be to give a go at fixing them.
What are the tricks we can use with Cypress to make them more reliable? (besides adding horrible sleep() instructions).
I guess adding check for elements that should load earlier?
Like ensuring a list has loaded it's elements because a button might be there before and would be clickable even if the callback has 0 associated targets.
[1] maybe anyone can do so by running at the same time "stress --cpu 4". With the right amount of threads, maybe leaving only one of two would work best, the point is not to hit the 10 sec timeout in every test instruction.
|