Unit tests sometimes fail due to failing the allowed sleep difference - /code/internal/worker/command_misc_test.go #104288
Labels
No Label
Good First Issue
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Job Type
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: studio/flamenco#104288
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating System(s): Linux
Flamenco Version
Is Broken: Somewhere in 3.4 and latest main
Worked OK: <=3.3
Short description of error
The unit tests seem to fail ~50% of the time for the same platform, different build machines.
Exact steps for others to reproduce the error
The flamenco executable build environment is done within a Docker buildx on amd64 platform, for either amd64 or arm64. Either target can fail but does not always fail.
The executable is successfully built, test is invoked as per documentation but in a docker buildx container...
The executables run fine, so this seems like a "timing thing" related to how the unit test is calculating time given the difference is negative. It is usually, -2 seconds in the failed builds.
This is very strange, I've never seen a negative time pop up, and I can't reproduce this issue. Might have something to do with the goroutine scheduler on specific hardware/platforms.
Could you try this patch to see if it fixes / changes anything?
From what I understand, the buildx cross-platform builds use QEMU and emulate hardware so this could be another riddle on top of different host machines we are using.
I have just tried that patch for the unit test and built arm64 and amd64 execs four times in a row for each and not seen a failure.
Thanks for testing :)