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
Intermittent test failure for create-user #123
Comments
Some more detail, if I This leads me to believe there is some residual state from the |
I just tried it and tests worked fine for me. Here are the steps that I used:
|
That more or less matches what I did you setup the test suite. It very much seems to matter what the test execution order is. The order that seems to reliably reproduced the issue, is:
I've also added logging in the tests in order to query the entire contents of the user table in the db right before the |
@zacharyweidenbach you are executing |
That seems to have resolved the failures. Even if I use jest's test-sequencer to coerce jest into running the delete-user test first, they both pass. Although that raises the question what's different between the |
Disregard, I see the |
Closing, using the wrong test script |
First off, thank you for this excellent example. I have learned a lot from it!
I'm encountering an intermittent test failure for the
create-user
e2e spec.When I log out the
result
monad at the controller for that particular endpoint, I see what might be a clue.When all tests pass, I see the conflict monad printed to the console, then the successful monad that contains the user entity id
However, when the test fails, I see the success monad printed first, then the conflict monad
I'm looking into this more, but my first instinct is that either the tests are running in parallel and that is creating some race condition, although I don't see any jest arguments altering the worker count to enable parallel test execution. Alternatively there might be something wrong in the testing infrastructure for the response context and it being mutated in a non-deterministic way.
The text was updated successfully, but these errors were encountered: