-
Notifications
You must be signed in to change notification settings - Fork 45
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
Failing JUnits on Windows #25
Comments
Thanks for reporting the issue. Unfortunately I can't provide support for the Windows platform. If you know how to fix the problem, please send a PR and I'll be happy to accept it. |
I have only a small improvement - add awaitShutdown() call in EphemeralKafkaBroker method stopBroker before trying to delete Kafka log directory.
Unfortunately it does not solve the problem completely, since it looks like Kafka does not close topic properly on shutdown :-( Tests run green, but temp folder clean-up is failing... |
Yes, I remember reading that Windows creates exclusive locks on files whereas Unix-like systems don't. This is probably something to do with that. I'll mark this as up-for-grabs so that someone with knowledge of Windows (and access to a Windows machine) can pick it up and work on it. |
I'm also suffering from this:
|
Also experiencing this issue 2018-04-03 15:56:25.652 ERROR 4816 --- [ Thread-4] org.apache.kafka.test.TestUtils : Error deleting C:\Users\stewalia\AppData\Local\Temp\kafka-7101259950782722212 java.nio.file.FileSystemException: C:\Users\stewalia\AppData\Local\Temp\kafka-7101259950782722212\product-0\00000000000000000000.index: The process cannot access the file because it is being used by another process.
|
Hi We were facing the same issue. in this.produce() ... it should be better to call .get() to be sure that message was really produced (sync)
Could you please give more details about how do you implement your tests? which methods, classes do you use to consume / produce messages? |
faced the same issue, as a workaround added the following to a Gradle clean task: import org.apache.tools.ant.taskdefs.condition.Os
clean {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
def tempDir = System.getProperties().getProperty("java.io.tmpdir")
def ft = fileTree(tempDir) {
include 'kafka-*'
exclude 'kafka-logs'
}
ft.visit {
FileVisitDetails fvd ->
println "deleted kafka temp folder: " + tempDir + fvd.name
delete fvd.file
}
}
} |
This problem prevents me from upgrading as well. My error message is slightly different however
|
At least in my case, the issue seems to be with Kafka itself https://issues.apache.org/jira/browse/KAFKA-13390 = apache/kafka#11426 |
Running JUnit EphemeralKafkaBrokerTest on Windows is failing:
There has to be some issue with statitcs since next run ends differenly
This might not be obvious on Linux platform. I suppose that there is some resource leak that keeps directory file handle open.
The text was updated successfully, but these errors were encountered: