codeconsole opened a new pull request, #16192: URL: https://github.com/apache/grails-core/pull/16192
Fixes the `MongoTransactionSpec` failures that take out "Build Grails with Groovy snapshot (shard 1)" about half the time. Builds on #16190. The container those specs talk to dies partway through, and every test after the first reports `MongoSocketReadException: Prematurely reached end of stream`. It is the only specification that flakes, and it runs beside three test JVMs, a MongoDB service container and Selenium's, each mongod sizing its cache from the memory of the whole machine. A transaction needs a replica set, which is the only reason these specs reached for a container - so the embedded server learns to be one: ```properties embedded.mongodb.replica-set=rs0 ``` Flapdoodle takes the name on the command line; what was missing is `replSetInitiate` and the wait for the node to elect itself, which is what turns a server that refuses every write into one that answers. An application that asks GORM for transactions gets a replica set without naming one: ```properties grails.mongodb.transactional=true ``` `MongoTransactionSpec` and `MongoTransactionDisabledSpec` now start that server rather than a container, on a port asked for rather than fixed. No Docker, so a developer without one runs them, and there is no container to lose halfway through. The rest of the Mongo specifications are untouched - they do not need a replica set, and whether mongo-java-server covers what they exercise is a separate question. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
