[
https://issues.apache.org/jira/browse/CAMEL-22149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18057822#comment-18057822
]
Grzegorz Grzybek commented on CAMEL-22149:
------------------------------------------
But I think you should simply catch the exception on Windows in
{{org.apache.camel.test.infra.cli.services.CliBuiltContainer}}:
{code:java}
try {
UID = (Integer) Files.getAttribute(target, "unix:uid");
GID = (Integer) Files.getAttribute(target, "unix:gid");
LOGGER.info("building container using user {} and group {}", UID, GID);
} catch (IOException e) {
LOGGER.warn("unable to retrieve user id and group: {}", e.getMessage());
}
{code}
Just catch {{UnsupportedOperationException}}.
> Allow Camel JBang IT test to be built and launched on Windows
> -------------------------------------------------------------
>
> Key: CAMEL-22149
> URL: https://issues.apache.org/jira/browse/CAMEL-22149
> Project: Camel
> Issue Type: Test
> Components: camel-jbang, tests
> Affects Versions: 4.12.0
> Reporter: Aurélien Pupier
> Assignee: Marco Carletti
> Priority: Minor
> Fix For: 4.x
>
>
> current failure:
> {noformat}
> java.lang.ExceptionInInitializerError
> at
> org.apache.camel.test.infra.cli.services.CliLocalContainerService.<init>(CliLocalContainerService.java:62)
> at
> org.apache.camel.test.infra.cli.services.CliLocalContainerService.<init>(CliLocalContainerService.java:57)
> at
> org.apache.camel.test.infra.common.services.SimpleTestServiceBuilder.build(SimpleTestServiceBuilder.java:76)
> at
> org.apache.camel.test.infra.cli.services.CliServiceFactory.createService(CliServiceFactory.java:33)
> at
> org.apache.camel.test.infra.cli.it.AbstractTestSupport.execute(AbstractTestSupport.java:27)
> at
> org.apache.camel.test.infra.cli.it.CliConfigITCase.setJBangVersionTest(CliConfigITCase.java:36)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
> Caused by: java.lang.UnsupportedOperationException: View 'unix' not available
> at
> java.base/sun.nio.fs.AbstractFileSystemProvider.readAttributes(AbstractFileSystemProvider.java:93)
> at java.base/java.nio.file.Files.readAttributes(Files.java:2084)
> at java.base/java.nio.file.Files.getAttribute(Files.java:1983)
> at
> org.apache.camel.test.infra.cli.services.CliBuiltContainer.<clinit>(CliBuiltContainer.java:64)
> ... 9 more
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)