-
Notifications
You must be signed in to change notification settings - Fork 70
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
Consolidate usage of http mock servers in tests #1392
Comments
Mock servers comparison approachI've compared implementations suggested in the task description. I've collected main use cases of Notes:
Mock servers comparison resultsSpring MockRestServiceServerPros:
Cons:
OkHttp MockWebServerPros:
Cons:
WireMock WireMock classPros:
Cons:
Notes:
|
@Semernitskaya thank you for this research. It seems the least cons on the option OkHttp.MockWebServer. Would you like to continue work on switching code base to selected option? |
@fatroom I agree, yes sure - I'll continue working on this task. My plan:
|
@Semernitskaya sounds perfect! |
Context
Currently the different tests in the code base use MockRestServiceServer from spring framework as well as RestDriver (same named library).
RestDriver is based on jetty 9 which is incompatible with the spring framework 6.
For moving forward we need to avoid direct relation on java.servlet based packages.
Possible Implementation
Keeping #837 in mind it's better to avoid usage of MockRestServiceServer in the tests, so we can use use MockWebServer from OkHttp.
The library is independent from javax.server namespace problems, as well as providing good enough level control.
Another option would be to wait for wiremock 3 release (beta version of wire mock 3 already available, though not sure if that would be possible without simultaneous migration of the spring framework to version 6 due to JEE api changes)
The text was updated successfully, but these errors were encountered: