flapdoodle-oss / de.flapdoodle.embed.mongo.spring

embedded mongo spring integration
Apache License 2.0
30 stars 7 forks source link

Tests hangs on "process has not exited" on Windows 11 #47

Open prondzyn opened 3 months ago

prondzyn commented 3 months ago

We are migrating our application from Spring Boot 2.x to 3.x. So we upgraded embed mongo from:

            <dependency>
                <groupId>de.flapdoodle.embed</groupId>
                <artifactId>de.flapdoodle.embed.mongo</artifactId>
                <version>3.2.6</version>
            </dependency>

to:

            <dependency>
                <groupId>de.flapdoodle.embed</groupId>
                <artifactId>de.flapdoodle.embed.mongo.spring30x</artifactId>
                <version>4.5.2</version>
                <scope>test</scope>
            </dependency>

Then we are running mvn clean test then.

Tests are running without any problems on Linux machines.

But Windows (tested on Windows 11) users have a problem. Running hands on:

d.f.e.process.runtime.ProcessControl     : stopOrDestroyProcess: process has not exited 

and does not move forward.

Workaround

I've found a workaround. I can run the mvn clean test as administrator, so then everything moves smoothly.

What is the real solution?

Workaround is good for a short term, but I do not understand why user which is creating process cannot exit them. Did anyone faced similar issue working on Windows?

michaelmosmann commented 3 months ago

@prondzyn do you have some more logging/stacktrace?

prondzyn commented 3 months ago

Unfortunately I do not have nothing particular.

Additionally, we tested the same on other Windows 11 machine and there the problem does not occur :/ Everything works correctly there.

So the problem is probably my machine-specific. So I think we can close the issue. But it is worth to be aware that is some (unknown) circumstances the problem can occur.

michaelmosmann commented 3 months ago

@prondzyn .. stopping processes on windows is tricky.. thats why i try to avoid to kill the process but shutdown the mongodb instead.. but if this fails, than there will be some problems.. so if you have such a case and some more logging i would be glad to see these..