Skip to content

Commit

Permalink
Unstable CustomJpaUserProviderDistTest on Windows
Browse files Browse the repository at this point in the history
* remove the starting slash from file URI

Closes keycloak#15371

Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
  • Loading branch information
Pepo48 authored and vmuzikar committed Nov 14, 2022
1 parent 4763cfb commit 13fcb9c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -530,7 +531,14 @@ public Path getDistPath() {
}

public void copyProvider(TestProvider provider) {
Path providerPackagePath = Paths.get(provider.getClass().getResource(".").getPath());
URL pathUrl = provider.getClass().getResource(".");
File fileUri;
try {
fileUri = new File(pathUrl.toURI());
} catch (URISyntaxException e) {
throw new RuntimeException("Invalid package provider path", e);
}
Path providerPackagePath = Paths.get(fileUri.getPath());
JavaArchive providerJar = ShrinkWrap.create(JavaArchive.class, provider.getName() + ".jar")
.addClasses(provider.getClasses())
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
Expand Down

0 comments on commit 13fcb9c

Please sign in to comment.