[addon] unit tests fail in master

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

[addon] unit tests fail in master

Post by uwestoehr »

@chennes , I discovered today failing unit tests with the Addon manager:

- open FC and switch to the Test framework WB
- there run the test "TestAddonManagerApp"
result: everything is OK
- re-run the same test
result: you get 5 failures

I think the tests should always pass, no matter how often they are run, right?
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [addon] unit tests fail in master

Post by chennes »

Yes, definitely. I thought I had cleaned all of that up (when I was first learning to write the tests I had lots of unintended side effects!), but apparently not. I'll give it a look this weekend.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: [addon] unit tests fail in master

Post by saso »

Why is there no Test Wb in daily windows builds :|
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [addon] unit tests fail in master

Post by uwestoehr »

saso wrote: Fri Mar 24, 2023 11:44 pm Why is there no Test Wb in daily windows builds :|
In the weeklys I provide there is test WB. Do the Conda builds don't have them or what is the build where this is not available?
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: [addon] unit tests fail in master

Post by saso »

uwestoehr wrote: Sat Mar 25, 2023 11:42 am
saso wrote: Fri Mar 24, 2023 11:44 pm Why is there no Test Wb in daily windows builds :|
In the weeklys I provide there is test WB. Do the Conda builds don't have them or what is the build where this is not available?
Yes both FreeCAD_weekly-builds-32457-2023-03-23-conda-Windows-x86_64-py38.7z and ...-py310.7z don't have it
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [addon] unit tests fail in master

Post by chennes »

I think those intermittent failures are because I'm not waiting long enough for the dialog to open: the goal is to keep each test under 0.1s (per Feathers' advice in Legacy Code), and that's probably not long enough in some cases. For those I'm going to try just adding a bit longer wait before deciding the test has failed. (That failure isn't related to the one Uwe pointed out above).
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [addon] unit tests fail in master

Post by chennes »

@uwestoehr this PR should fix the issue you report: https://github.com/FreeCAD/FreeCAD/pull/9047
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [addon] unit tests fail in master

Post by uwestoehr »

chennes wrote: Sat Mar 25, 2023 3:40 pm @uwestoehr this PR should fix the issue you report: https://github.com/FreeCAD/FreeCAD/pull/9047
Many thanks. Confirmed fixed.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: [addon] unit tests fail in master

Post by uwestoehr »

saso wrote: Sat Mar 25, 2023 1:01 pm Yes both FreeCAD_weekly-builds-32457-2023-03-23-conda-Windows-x86_64-py38.7z and ...-py310.7z don't have it
Can you therefore please open a new thread and inform looo about this that he can have a look?
Post Reply