-
Notifications
You must be signed in to change notification settings - Fork 232
fix: handle when FileSystem already exists #1140
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
Conversation
4ec1228
to
d57b2e6
Compare
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.
The implementation looks good, can you add a test where the jar file system already exists and playwright would throw without the fix?
I believe you can do something like ./tools/test-cli-version and in the main test file create jar file system before calling playwright, something like
URI uri = new URI("jar:file:/home/user/.m2/repository/com/microsoft/playwright/driver-bundle/1.28.0/driver-bundle-1.28.0.jar!/driver/linux");
FileSystem fs = FileSystems.newFileSystem(uri, Collections.emptyMap());
assertNotNull(fs);
try (Playwright playwright = Playwright.create()) {
Browser browser = playwright.chromium().launch();
Page page = browser.newPage();
}
driver-bundle/src/main/java/com/microsoft/playwright/impl/driver/jar/DriverJar.java
Outdated
Show resolved
Hide resolved
@microsoft-github-policy-service agree |
@microsoft-github-policy-service agree |
...-cli-fatjar-version/src/main/java/com/microsoft/playwright/testclifatjarversion/TestApp.java
Outdated
Show resolved
Hide resolved
...-cli-fatjar-version/src/main/java/com/microsoft/playwright/testclifatjarversion/TestApp.java
Outdated
Show resolved
Hide resolved
driver-bundle/src/main/java/com/microsoft/playwright/impl/driver/jar/DriverJar.java
Outdated
Show resolved
Hide resolved
driver-bundle/src/main/java/com/microsoft/playwright/impl/driver/jar/DriverJar.java
Outdated
Show resolved
Hide resolved
Looks like the Test CLI action ran successfully this time around 🎉 |
tools/test-cli-fatjar/src/main/java/com/microsoft/playwright/testclifatjar/TestApp.java
Outdated
Show resolved
Hide resolved
ce504e2
to
07daf9e
Compare
Is this ready to merge? |
Yes, it's ready to be merged, you can do that or I can merge later once the tests complete. Thanks for addressing all the comments! |
Fixes #1138
We verified this works with fat jars with our own.
Reference: Suwayomi/Suwayomi-Server#462