Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TDB2 test cases fails nondeterministic #3448

Closed
felixschurk opened this issue May 9, 2024 · 1 comment · Fixed by #3449
Closed

TDB2 test cases fails nondeterministic #3448

felixschurk opened this issue May 9, 2024 · 1 comment · Fixed by #3449
Assignees

Comments

@felixschurk
Copy link
Contributor

When running the tdb2.test.cpp test sometimes the test is failing as one can see in the below output.
On the test runs it fails in the second invocation, in the second test run it fails on the ninth invocation.

Similar can also be seen in this actions run where interestingly only one runner has this problem, whereas the others do run fine.

It came to me when updating to the #3446 runner, however it can be reproduced with the current develop using in the build/test directory.

for i in {1..14}
do
./tdb2.test.cpp
done

First Test Runs

❯ ctest --test-dir build-ninja  --output-on-failure -R tdb2 --repeat-until-fail 10
Internal ctest changing into directory: /home/felix/data/taskwarrior/build-ninja
Test project /home/felix/data/taskwarrior/build-ninja
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................   Passed    0.36 sec
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................***Failed    0.33 sec
1..12
ok 1 - TDB2 Read empty pending
ok 2 - TDB2 Read empty completed
ok 3 - TDB2 Read empty undo
ok 4 - TDB2 Read empty backlog
ok 5 - TDB2 after add, 1 pending task
ok 6 - TDB2 after add, 0 completed tasks
ok 7 - TDB2 after add, 1 revert possible
ok 8 - TDB2 after add, 6 local changes
ok 9 - TDB2 after set, 1 pending task
ok 10 - TDB2 after set, 0 completed tasks
ok 11 - TDB2 after set, 1 revert possible
not ok 12 - TDB2 after set, 7 local changes
# expected: 7
#      got: 8
# 11 passed, 1 failed, 0 skipped. 91.7% passed.


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.71 sec

The following tests FAILED:
	  7 - tdb2.test.cpp (Failed)
Errors while running CTest

Second Test Runs

❯ ctest --test-dir build-ninja  --output-on-failure -R tdb2 --repeat-until-fail 10
Internal ctest changing into directory: /home/felix/data/taskwarrior/build-ninja
Test project /home/felix/data/taskwarrior/build-ninja
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................   Passed    0.55 sec
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................   Passed    0.26 sec
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................   Passed    0.29 sec
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................   Passed    0.30 sec
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................   Passed    0.29 sec
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................   Passed    0.28 sec
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................   Passed    0.30 sec
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................   Passed    0.30 sec
    Start 7: tdb2.test.cpp
    Test #7: tdb2.test.cpp ....................***Failed    0.31 sec
1..12
ok 1 - TDB2 Read empty pending
ok 2 - TDB2 Read empty completed
ok 3 - TDB2 Read empty undo
ok 4 - TDB2 Read empty backlog
ok 5 - TDB2 after add, 1 pending task
ok 6 - TDB2 after add, 0 completed tasks
ok 7 - TDB2 after add, 1 revert possible
ok 8 - TDB2 after add, 6 local changes
ok 9 - TDB2 after set, 1 pending task
ok 10 - TDB2 after set, 0 completed tasks
ok 11 - TDB2 after set, 1 revert possible
not ok 12 - TDB2 after set, 7 local changes
# expected: 7
#      got: 8
# 11 passed, 1 failed, 0 skipped. 91.7% passed.


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   2.93 sec

The following tests FAILED:
	  7 - tdb2.test.cpp (Failed)
Errors while running CTest
@djmitche
Copy link
Collaborator

--repeat-until-fail is pretty cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants