From c833f0f38e68fd6d726b063199d5a12324865acf Mon Sep 17 00:00:00 2001 From: Friedrich Volz Date: Fri, 24 Jan 2025 11:52:38 +0100 Subject: [PATCH 1/2] bump dependency version --- .../java/de/fraunhofer/iosb/app/aas/FaaastServiceManager.java | 2 +- gradle.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/FaaastServiceManager.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/FaaastServiceManager.java index 626ef93c..b98edac7 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/FaaastServiceManager.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/FaaastServiceManager.java @@ -141,7 +141,7 @@ public void stopService(URL aasServiceUrl) { try { service.start(); - } catch (MessageBusException | EndpointException faaastServiceException) { + } catch (Exception faaastServiceException) { throw new EdcException(GENERIC_EXCEPTION_MESSAGE, faaastServiceException); } return service; diff --git a/gradle.properties b/gradle.properties index 03292f61..f8b311de 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ javaVersion=17 group=org.eclipse.edc -edcVersion=0.10.0 -faaastVersion=1.1.0 +edcVersion=0.10.1 +faaastVersion=1.2.0 aas4jVersion=1.0.2 mockitoVersion=5.2.0 jupiterVersion=5.10.2 From b65cecb9fd6619706740eab3978ea350a7221365 Mon Sep 17 00:00:00 2001 From: Friedrich Volz Date: Fri, 24 Jan 2025 11:58:34 +0100 Subject: [PATCH 2/2] add new exceptions --- .../iosb/aas/impl/AllAasDataProcessorFactoryTest.java | 4 +++- .../aas/impl/RegisteredAasDataProcessorFactoryTest.java | 7 +++++-- .../impl/DefaultSelfSignedCertificateRetrieverTest.java | 4 +++- .../test/java/de/fraunhofer/iosb/testutils/TestUtils.java | 5 +++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/data-plane-aas/src/test/java/de/fraunhofer/iosb/aas/impl/AllAasDataProcessorFactoryTest.java b/data-plane-aas/src/test/java/de/fraunhofer/iosb/aas/impl/AllAasDataProcessorFactoryTest.java index e1fdfa8a..8f2d2116 100644 --- a/data-plane-aas/src/test/java/de/fraunhofer/iosb/aas/impl/AllAasDataProcessorFactoryTest.java +++ b/data-plane-aas/src/test/java/de/fraunhofer/iosb/aas/impl/AllAasDataProcessorFactoryTest.java @@ -20,6 +20,7 @@ import de.fraunhofer.iosb.ilt.faaast.service.exception.ConfigurationException; import de.fraunhofer.iosb.ilt.faaast.service.exception.EndpointException; import de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException; +import de.fraunhofer.iosb.ilt.faaast.service.model.exception.PersistenceException; import de.fraunhofer.iosb.model.aas.service.Service; import de.fraunhofer.iosb.ssl.impl.DefaultSelfSignedCertificateRetriever; import de.fraunhofer.iosb.testutils.TestUtils; @@ -55,7 +56,8 @@ void testSendForeign() throws IOException { // This means the HTTP request went through --> no certificate problems etc. assertNotEquals(500, response.code()); } - } catch (MessageBusException | EndpointException | ConfigurationException | AssetConnectionException e) { + } catch (MessageBusException | EndpointException | ConfigurationException | AssetConnectionException | + PersistenceException e) { fail("Failed starting FA³ST service"); } } diff --git a/data-plane-aas/src/test/java/de/fraunhofer/iosb/aas/impl/RegisteredAasDataProcessorFactoryTest.java b/data-plane-aas/src/test/java/de/fraunhofer/iosb/aas/impl/RegisteredAasDataProcessorFactoryTest.java index 9c35a3fc..b17e735a 100644 --- a/data-plane-aas/src/test/java/de/fraunhofer/iosb/aas/impl/RegisteredAasDataProcessorFactoryTest.java +++ b/data-plane-aas/src/test/java/de/fraunhofer/iosb/aas/impl/RegisteredAasDataProcessorFactoryTest.java @@ -20,6 +20,7 @@ import de.fraunhofer.iosb.ilt.faaast.service.exception.ConfigurationException; import de.fraunhofer.iosb.ilt.faaast.service.exception.EndpointException; import de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException; +import de.fraunhofer.iosb.ilt.faaast.service.model.exception.PersistenceException; import de.fraunhofer.iosb.model.aas.net.AasAccessUrl; import de.fraunhofer.iosb.model.aas.service.Service; import de.fraunhofer.iosb.ssl.impl.DefaultSelfSignedCertificateRetriever; @@ -60,7 +61,8 @@ void testSendRegistered() throws IOException { // This means the HTTP request went through --> no certificate problems etc. assertNotEquals(500, response.code()); } - } catch (MessageBusException | EndpointException | ConfigurationException | AssetConnectionException e) { + } catch (MessageBusException | EndpointException | ConfigurationException | AssetConnectionException | + PersistenceException e) { fail("Failed starting FA³ST service"); } } @@ -85,7 +87,8 @@ void testSendForeign() throws IOException { "certificates."); } catch (SSLException sslException) { // self-signed - } catch (MessageBusException | EndpointException | ConfigurationException | AssetConnectionException e) { + } catch (MessageBusException | EndpointException | ConfigurationException | AssetConnectionException | + PersistenceException e) { fail("Failed starting FA³ST service"); } } diff --git a/data-plane-aas/src/test/java/de/fraunhofer/iosb/ssl/impl/DefaultSelfSignedCertificateRetrieverTest.java b/data-plane-aas/src/test/java/de/fraunhofer/iosb/ssl/impl/DefaultSelfSignedCertificateRetrieverTest.java index f17b913d..0c4e2897 100644 --- a/data-plane-aas/src/test/java/de/fraunhofer/iosb/ssl/impl/DefaultSelfSignedCertificateRetrieverTest.java +++ b/data-plane-aas/src/test/java/de/fraunhofer/iosb/ssl/impl/DefaultSelfSignedCertificateRetrieverTest.java @@ -19,6 +19,7 @@ import de.fraunhofer.iosb.ilt.faaast.service.exception.ConfigurationException; import de.fraunhofer.iosb.ilt.faaast.service.exception.EndpointException; import de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException; +import de.fraunhofer.iosb.ilt.faaast.service.model.exception.PersistenceException; import de.fraunhofer.iosb.testutils.TestUtils; import org.eclipse.edc.spi.result.Result; import org.junit.jupiter.api.Test; @@ -51,7 +52,8 @@ void getSelfSignedCertificate() throws MalformedURLException { Result certResult; try (var ignored = new TestUtils().startFaaastService(port)) { certResult = new DefaultSelfSignedCertificateRetriever().getSelfSignedCertificate(url); - } catch (MessageBusException | EndpointException | ConfigurationException | AssetConnectionException e) { + } catch (MessageBusException | EndpointException | ConfigurationException | AssetConnectionException | + PersistenceException e) { fail("Failed starting FA³ST service"); return; } diff --git a/data-plane-aas/src/test/java/de/fraunhofer/iosb/testutils/TestUtils.java b/data-plane-aas/src/test/java/de/fraunhofer/iosb/testutils/TestUtils.java index 5f7bfd05..3f696259 100644 --- a/data-plane-aas/src/test/java/de/fraunhofer/iosb/testutils/TestUtils.java +++ b/data-plane-aas/src/test/java/de/fraunhofer/iosb/testutils/TestUtils.java @@ -22,6 +22,7 @@ import de.fraunhofer.iosb.ilt.faaast.service.exception.ConfigurationException; import de.fraunhofer.iosb.ilt.faaast.service.exception.EndpointException; import de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException; +import de.fraunhofer.iosb.ilt.faaast.service.model.exception.PersistenceException; import de.fraunhofer.iosb.ilt.faaast.service.persistence.memory.PersistenceInMemoryConfig; import de.fraunhofer.iosb.ilt.faaast.service.starter.util.ServiceConfigHelper; import de.fraunhofer.iosb.ssl.impl.DefaultSelfSignedCertificateRetriever; @@ -53,7 +54,7 @@ public Certificate[] getSelfSignedCertificate() { * @return AutoCloseable handle on FA³ST service */ public ServiceHandle startFaaastService(int port) throws ConfigurationException, AssetConnectionException, - MessageBusException, EndpointException { + MessageBusException, EndpointException, PersistenceException { var serviceConfig = new ServiceConfig.Builder() .endpoint(new HttpEndpointConfig.Builder().port(port).build()) .persistence(PersistenceInMemoryConfig.builder() @@ -74,7 +75,7 @@ public static class ServiceHandle implements AutoCloseable { private final Service service; - ServiceHandle(Service service) throws MessageBusException, EndpointException { + ServiceHandle(Service service) throws MessageBusException, EndpointException, PersistenceException { this.service = service; this.service.start(); }