-
Notifications
You must be signed in to change notification settings - Fork 328
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
Cannot connect embedded mongodb when running tests #4
Comments
You need to create a real collection in MongoDB or you can use embedded MongoDB and for that you need to use annotation for that and you need to setup dummy data before each test and for that you can use beforeEach method. |
@Rajnish20 I'm having the same issue, I think that there is a mismatch between the mongo version from the Spring data starter and the version from the Embedded Mongo test dependency. |
@alexandergabe II had the same exception as you
I fixed the issue by creating an application.yml file in the test package where I fixed the version of the embedded mongodb. |
…xchange Webclient exchange
I am on step 48. When running the test for findAll() I get an exception error stating "Set the spring.mongodb.embedded.version property or define your own MongodConfig bean to use embedded MongoDB". After doing some research, it appears I have to set the version. I tried creating an application.properties and using 'spring.mongodb.embedded.version = 5.05 ( or any other version, not sure which one to use.) and after running the test case again I get an error stating that I cannot download the embedded mongodb because the optional proxy is empty. I am unsure what that means and I cannot find a solution. Please help?
The text was updated successfully, but these errors were encountered: