My exploration of the MongoDB driver shows that 200ms might be too short of a default in our tests.
See the discussions in https://jira.mongodb.org/browse/JAVA-1803
When the discussion concludes, let's remove my retry code logic and increase the timeout instead.
What are you referring to exactly? The DEFAULT_TIMEOUT as per MongoDBConfiguration is 5000. I can see that the test hibernate.properties file in the mongodb module uses an explicit value of 200. Is this what you mean? You just want to remove it? Which leads me to the question of which retry logic you are referring to?
Hmm, I guess you talk about MongoDBDatastoreProvider#extractDatabase or are there more?
Yes the test timeout should be moved to 1s.
The retry logic is this one https://github.com/hibernate/hibernate-ogm/commit/a6b359c5e28ef26b6f1bf65db4ec56a2a1771215#diff-325a29a9f8968595d918404aafcf2d87
I had added it as a workaround but the "proper" solution is a long enough timeout.
Fixed by increasing the time-out and removing the loop-based work-around.