-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Double-check for directory exists in the ensureParentDirExists(File) #978
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
Double-check for directory exists in the ensureParentDirExists(File) #978
Conversation
Hello.
|
This issue affects me too... Please apply some fix for it. |
Could you provide some kind of test? Some sort of proof that this solves the problem? Parallel execution isn't officially supported yet. If you can provide tests we can add to prove that it works, we can probably get it merged. |
I did it. Could you please review my test? If you run it without my changes in URLOutputStream, you'll get many "Failed to create parent directory" errors. But another assertion in my test which verifies that all necessary temp files and their parents are created will be passed. |
import org.webbitserver.HttpResponse; | ||
import org.webbitserver.WebServer; | ||
import org.junit.rules.TemporaryFolder; | ||
import org.webbitserver.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No star imports please, and please undo reordering of imports. Try to reduce the PR to significant changes only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 -- I have had the same issue, and can confirm this fixes it. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi.
I have several JUnit runners which runs cucumber tests in parallel at the same time. Each runner generate JSON file with test results to the one directory, e.g. ./target/json-files/
Sometimes I have an issue when one of runner is unable to create reports directory because another runner already done this. And it fails with error "Failed to create directory".
I think there is a make sense to double-check if reports directory is already exists (method cucumber.runtime.io.URLOutputStream#ensureParentDirExists).