spring-projects / spring-projects/spring-modulith
Events do not get observed, in multiple scenario tests
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
I have a fairly simple repository with a number of application module tests.
These tests trigger a an event and expect another event to appear. When I run each test in isolation, they work fine. But when I run the whole test suite at once, some, seemingly random, scenarios won't catch the published events.
In the logs, you can see that they are published:
The Initial event got triggered,
then the MisterxErrorEvent is triggered. Therefore it should be seen by the scenario. But as you can see, it threw an exception because it seemingly did not receive the exception.
This is the test in question:
The test names were named to test because i wanted to find out what might be the problem, but i could not find anything on my side that could be off.
Cherry on top: When I deactivate some tests, OTHER tests fail.
The repository is here:
https://github.com/Lausi95/misterx
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or test paths are named; start by reproducing the failure from the linked misterx repository in isolation and as a full suite. Compare the test setup and event observation between runs, then identify the shared state or ordering issue that makes event assertions nondeterministic. Done means the affected scenarios pass reliably in the full suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100