-
Notifications
You must be signed in to change notification settings - Fork 16
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
Not listening on HTTP port. The WireMock server is most likely stopped #22
Comments
Hi @nik24 , if you are running with JUnit 4, you need to start and stop the schema registry mock manually (in setup and teardown). RegisterExtension is not doing anything. If you really want to use JUnit4 for some reason, then it's best to fork and replace Extension with a rule (should be pretty straight-forward substitution). I could merge your fork as a separate module. If you rather want to use JUnit 5, please open a new ticket with the respective stack trace and the maven/gradle dependency tree. It looks like you have two conflicting versions, which may also be a bad setup on our end and needs to be addressed. |
Thanks for the reply @AHeise . I have raised another ticket with relevant logs for Junit5. However, if I were to use Junit4 and do as you suggested, should I create entirely another class that implements TestRule with the same contents as Extension? |
Fair point. That will result in quite a bit duplicated code. Probably easier to make the mock framework agnostic and add extension/rule as trivial subprojects. I could look at it tomorrow if that's soon enough for you. |
I have gone with Junit5 finally. The tests are running fine now. |
Opened #25 for junit4 support and closing this as a question. |
I am facing an error while running tests with Schema Registry mock along with JUnit4
Code looks like below:
Can there be some issue with dependency management as this test is executing in a module that is inheriting testing dependencies fom the parent project.
I tried to run this using Junit 5 and can see logs of running jetty server
but it keeps giving me an error java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonMerge while executing test
The text was updated successfully, but these errors were encountered: