question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

windows: Embedded mongodb processes remains active after test run in Maven

See original GitHub issue

Hello,

I’ve got a very annoying problem using embedded mongodb. Setup: <mongo-embedded-version>3.4.6</mongo-embedded-version> Java 11 Maven 3.6.3 Spring-boot 2.6.6 Spring-cloud 3.2.4 Windows 10 spring.mongodb.embedded.version=4.2.19

I’m not a local admin on the machine, maybe related but I don’t know.

The problem is that the extract-<uuid>extractmongod.exe process gets spawned by the tests but afterwards won’t go away. It then eats my CPU and I have to kill the processes (8+ of them) manually. See attached screenshot. The problem occurs half of the time I run the tests in the project using Maven. My colleague using a Mac does not seem to have a similar problem.

embedmongo-issue

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ThomasAtAcertacommented, Jun 15, 2022

@michaelmosmann The code is not public. The issue occurs with tests in combination with:

https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-maven-intellij and https://docs.microsoft.com/en-us/samples/azure-samples/hello-spring-function-azure/hello-spring-function-azure/

Likely the way the Spring context is constructed has something to do with it.

There’s a workaround I found using <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <forkCount>1</forkCount> <reuseForks>false</reuseForks> </configuration> </plugin>

Especially the reuseForks=false seems to help, but it does have a significant impact on the test performance.

0reactions
michaelmosmanncommented, Dec 6, 2022

@behindsun there are new releases, so if this is still an issue, please reopen:)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does my flapdoodle Embedded MongoDB test fail to run ...
I used https://start.spring.io/ to generate a fresh new Spring 2.0 MongoDB Maven project, and I want to have an embedded MongoDB database for...
Read more >
Spring Boot Integration Testing with Embedded MongoDB
Learn how to use Flapdoodle's embedded MongoDB solution together with Spring Boot to run MongoDB integration tests smoothly.
Read more >
Spring Native documentation
When spring-aot-maven-plugin is applied, mvn test -DspringAot=false runs tests in regular mode while mvn test generates related sources and run ...
Read more >
4.0 Changelog — MongoDB Manual
SERVER-60290 Update Windows external auth test distribution ... jstests/core/profile2.js fails when background operations are run against test database.
Read more >
Integration Testing with MongoDB & Spring Data - Medium
The initializeDB() method is annotated with @BeforeClass to start this before test case beings. This method fires up an embedded MongoDB instance which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found