Closed WhoSoup closed 4 years ago
I note that the test simTest/factomd_test#TestAnElection
which is part of the CI tests (./test.sh short) is passing though :thinking:
I just tried running another one go test -v -timeout=10m -run=TestOne ./simTest/...
and it passed too. Where are you seeing those failure? On your machine? On the CI? Those tests are defintively slow (this one was 150s) but they seem ok? I didn't have time to run them all locally tonight
Where are you seeing those failure? On your machine? On the CI? Those tests are defintively slow (this one was 150s) but they seem ok? I didn't have time to run them all locally tonight
I noticed them in my EntrySync branch: https://app.circleci.com/pipelines/github/FactomProject/factomd/306/workflows/cbe4d476-cbe8-4b18-974a-c2355aee181e/jobs/18160
I thought I tested them in the FD-1225_wax_rollup branch and they failed there, too, but I just re-ran and they are working. Could be just a case of user error, which means I'll at least have something to go on.
Looks like the bug was in my entrysync draft pull and I mistakenly thought I was on the main wax branch when I did my tests yesterday
The unit tests in /simTest/ all use the simulation environment of /testHelper/simulation/ but this seems to not be working in Wax. The problem seems to be that state.LLeaderHeight isn't updating, though at the moment I'm not sure if the issue is that it's not being updated right, or that it would be updated right if something else was working properly.
Possible reasons:
The simulation tests have their own timeout: https://github.com/FactomProject/factomd/blob/b888bfaac9e12099f9e2045c45b27d2222908360/testHelper/simulation/simulation.go#L153-L170
However, I have raised this cap manually to something much higher and the test still timed out.
The code that times out specifically is inside SetupSim(): https://github.com/FactomProject/factomd/blob/b888bfaac9e12099f9e2045c45b27d2222908360/testHelper/simulation/simulation.go#L224
And more specifically, the line inside createAuthoritySet that waits for three blocks: https://github.com/FactomProject/factomd/blob/b888bfaac9e12099f9e2045c45b27d2222908360/testHelper/simulation/simulation.go#L296