Describe the bug
It seems the AuthService test suite fails more often than other test suites during the GitHub Actions build step, and these failures do not happen locally.
Interestingly, re-triggering the build step makes the tests pass, suggesting a possible race condition, cache problems, or other timing-sensitive issue within the AuthService (or its test setup)
To Reproduce
- Go to the GitHub Actions Build workflow page.
- Look for recent non-CRIS, non-Dependabot triggered builds (status doesn't matter).
- (Optional) In the top right of a build summary, check the 'Attempts' dropdown and select the latest failed build.
- Scroll down to the 'Annotations' section for the 'tests (22.x)' or 'tests (20.x)' job. In most cases, the failure comes from the
AuthService test.
Examples
Expected behavior
The AuthService test suite should pass consistently like other test suites
Related work
Describe the bug
It seems the
AuthServicetest suite fails more often than other test suites during the GitHub Actions build step, and these failures do not happen locally.Interestingly, re-triggering the build step makes the tests pass, suggesting a possible race condition, cache problems, or other timing-sensitive issue within the
AuthService(or its test setup)To Reproduce
AuthService test.Examples
✖ should return token object when it is valid: https://github.com/DSpace/dspace-angular/actions/runs/30265995039/job/89976681695#step:13:9766✖ should return a token object: https://github.com/DSpace/dspace-angular/actions/runs/29429629870/job/87400960802#step:13:10113AuthService test should return false when token is not expired FAILED Error: Expected null to be false.: https://github.com/DSpace/dspace-angular/actions/runs/30375025302/job/90328359170?pr=5995#step:13:8565Expected behavior
The
AuthServicetest suite should pass consistently like other test suitesRelated work