-
Notifications
You must be signed in to change notification settings - Fork 863
Description
The context
The need for @DirtiesContext
on all unit tests using a grpc service created by this starter greatly slows down tests, and doesn't feel like a proper solution as applications scale.
The bug
What's the problem? What's not working? What do you expect to happen.
all @SpringBootTest
classes also require @DirtiesContext
in order for tests across the application to function propertly.
Is there a stacktrace or a hint in the logs? (very important)
Screenshots work as well, but don't screenshot your logs.
Steps to Reproduce
Steps to reproduce the behavior:
- Create an application using gRPC services.
- Write 2 or more
@SpringBootTest
classes - Run your project's tests. These test classes will compete and your tests will fail.
Workaround, add @DirtiesContext
to each test, but, this greatly slows down execution time of your application tests.
The application's environment
Which versions do you use?
- Spring (boot):
- grpc-java:
- grpc-spring-boot-starter:
- java: version + architecture (64bit?)
- Other relevant libraries...
These versions don't really matter - it's a core issue with this library that is seemingly well documented, but there has to be a better way?
Additional context
- Did it ever work before?
No
- Do you have a demo?
No, but this issue is seemingly well documented with this project, but @DirtiesContext
feels like a workaround instead of a solution.