fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
24.12k stars 1.35k forks source link

Menu tests are failing on some developer computers #4976

Open Jacalz opened 1 month ago

Jacalz commented 1 month ago

Checklist

Describe the bug

I am getting some strange behaviour where the tests are failing locally on my machine but all of the tests are passing on the CI (yes, the failing tests are being run on CI because -tags ci makes no difference and so on). When I first noticed these issues, I pushed up the modified .png files but that caused the CI to fail. Strange?

How to reproduce

  1. Run the widget tests locally go test ./widget/....
  2. Notice that two menu tests are failing.
  3. Notice that the tests are passing on CI.

Screenshots

These are the images produced when failing:

layout_shortcuts_other layout_shortcuts_other_theme_changed

Example code

Part of tests. See errors bellow:

--- FAIL: TestMenu_Layout (0.49s)
    --- FAIL: TestMenu_Layout/menu_with_shortcuts (0.39s)
        util.go:55: 
                Error Trace:    /var/home/jacob/git/fyne/internal/test/util.go:55
                                            /var/home/jacob/git/fyne/test/test.go:78
                                            /var/home/jacob/git/fyne/widget/menu_desktop_test.go:191
....
                Error Trace:    /var/home/jacob/git/fyne/internal/test/util.go:55
                                            /var/home/jacob/git/fyne/test/test.go:78
                                            /var/home/jacob/git/fyne/widget/menu_desktop_test.go:195
                                            /var/home/jacob/git/fyne/test/test.go:318
                                            /var/home/jacob/git/fyne/widget/menu_desktop_test.go:194

Fyne version

develop@0e265645f3ab1604a854755f6a4d1ed1e18293a5

Go compiler version

1.22.4

Operating system and version

Fedora Silverblue 40

Additional Information

No response

andydotxyz commented 4 weeks ago

The tests are not failing locally for me. I don't think this can be a blocker until we know what the actual cause is...

Jacalz commented 4 weeks ago

Did you test on Linux?

andydotxyz commented 4 weeks ago

Yes, Debian stable.

andydotxyz commented 3 weeks ago

Re-confirmed on latest develop - no test failures

Jacalz commented 3 weeks ago

Something strange is definitely going on. Will try to investigate when I have time. Not really a nice bug to have because it makes it a lot harder to do testing locally.

andydotxyz commented 3 weeks ago

I'm sure it is frustrating - but so far we don't have reports of this failing for anyone else.