From c25e03220c4da06aba6ebf6d9d1bd29f89e8f0b2 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Tue, 23 Jul 2024 11:23:31 +0200 Subject: Update Janusgraph to 0.6.0 in traversal - update Tinkerpop (3.4.13 -> 3.5.0) + Janusgraph (0.5.0 -> 0.6.0) - bump version to 1.14.5-SNAPSHOT Issue-ID: AAI-3934 Change-Id: Idd81dbfe7a16cc448194613b8b429d54cbd65ccc Signed-off-by: Fiete Ostkamp --- aai-traversal/pom.xml | 57 +++------------------- .../src/main/java/org/onap/aai/TraversalApp.java | 14 ++++-- .../java/org/onap/aai/AAIGremlinQueryTest.java | 4 ++ .../src/test/java/org/onap/aai/AAISetup.java | 4 +- .../test/java/org/onap/aai/QueryParameterTest.java | 4 ++ .../test/java/org/onap/aai/SubgraphPruneTest.java | 4 ++ .../org/onap/aai/TraversalTestConfiguration.java | 4 ++ .../java/org/onap/aai/rest/BadQueryFormatTest.java | 4 ++ .../java/org/onap/aai/rest/ConfigurationTest.java | 4 ++ .../java/org/onap/aai/rest/QueryConsumerTest.java | 4 ++ .../history/AbstractSpringHistoryRestTest.java | 4 ++ .../org/onap/aai/rest/search/OnapQueryTest.java | 2 +- .../java/org/onap/aai/rest/search/QueryTest.java | 3 +- pom.xml | 6 +-- test_csvWriter.csv | 2 - version.properties | 2 +- 16 files changed, 60 insertions(+), 62 deletions(-) delete mode 100644 test_csvWriter.csv diff --git a/aai-traversal/pom.xml b/aai-traversal/pom.xml index b80e1bd..6eb2e3d 100644 --- a/aai-traversal/pom.xml +++ b/aai-traversal/pom.xml @@ -26,7 +26,7 @@ org.onap.aai.traversal traversal - 1.14.4-SNAPSHOT + 1.14.5-SNAPSHOT org.onap.aai.traversal aai-traversal @@ -58,8 +58,6 @@ ${project.build.directory}/${project.artifactId}-${project.version}-build/ 1.0.0 onap - alpine - 1.13.4 @@ -94,8 +92,8 @@ 2.4.13 - 0.5.3 - 3.4.13 + 0.6.0 + 3.5.1 2020.0.2 @@ -119,41 +117,6 @@ docker - - org.codehaus.groovy.maven - gmaven-plugin - 1.0 - - - pre-clean - - - parse-base - prepare-package - - execute - - - - def userAaiBaseImage = session.userProperties['aai.base.image']; - def userAaiCommonVersion = - session.userProperties['aai.base.image.version']; - if (userAaiCommonVersion != null) { - project.properties['aai.base.image.version'] = - userAaiCommonVersion; - } - if (userAaiBaseImage != null) { - project.properties['aai.base.image'] = userAaiBaseImage; - } - log.info 'Base image flavour: ' + - project.properties['aai.base.image']; - log.info 'Base image version: ' + - project.properties['aai.base.image.version']; - - - - - io.fabric8 docker-maven-plugin @@ -410,16 +373,6 @@ - - commons-configuration - commons-configuration - - - org.apache.commons - commons-lang3 - - - org.apache.commons commons-lang3 @@ -459,6 +412,10 @@ org.slf4j slf4j-log4j12 + + org.hibernate + hibernate-validator + diff --git a/aai-traversal/src/main/java/org/onap/aai/TraversalApp.java b/aai-traversal/src/main/java/org/onap/aai/TraversalApp.java index b382a16..db6076b 100644 --- a/aai-traversal/src/main/java/org/onap/aai/TraversalApp.java +++ b/aai-traversal/src/main/java/org/onap/aai/TraversalApp.java @@ -40,6 +40,8 @@ import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; +import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; @@ -49,8 +51,14 @@ import org.springframework.core.env.Profiles; import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; @SpringBootApplication( - exclude = {DataSourceAutoConfiguration.class, - DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class, JmsAutoConfiguration.class}) + exclude = { + DataSourceAutoConfiguration.class, + DataSourceTransactionManagerAutoConfiguration.class, + HibernateJpaAutoConfiguration.class, + JmsAutoConfiguration.class, + CassandraDataAutoConfiguration.class, + CassandraAutoConfiguration.class + }) // Component Scan provides a way to look for spring beans // It only searches beans in the following packages // Any method annotated with @Bean annotation or any class @@ -58,7 +66,7 @@ import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; @ComponentScan( basePackages = {"org.onap.aai.config", "org.onap.aai.web", "org.onap.aai.setup", "org.onap.aai.tasks", "org.onap.aai.service", "org.onap.aai.rest", "org.onap.aai.aaf", - "org.onap.aai.aailog"}) + "org.onap.aai.aailog", "org.onap.aai.introspection", "org.onap.aai.rest.notification"}) public class TraversalApp { private static final Logger logger = LoggerFactory.getLogger(TraversalApp.class.getName()); diff --git a/aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java index 652c2f3..0bac97e 100644 --- a/aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java @@ -47,6 +47,9 @@ import org.onap.aai.util.AAIConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; +import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.context.annotation.Import; @@ -80,6 +83,7 @@ import com.jayway.jsonpath.JsonPath; classes = TraversalApp.class) @TestPropertySource(locations = "classpath:application-test.properties") @ContextConfiguration(initializers = PropertyPasswordConfiguration.class) +@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test @Import(TraversalTestConfiguration.class) public class AAIGremlinQueryTest { diff --git a/aai-traversal/src/test/java/org/onap/aai/AAISetup.java b/aai-traversal/src/test/java/org/onap/aai/AAISetup.java index 7849671..5e6fccc 100644 --- a/aai-traversal/src/test/java/org/onap/aai/AAISetup.java +++ b/aai-traversal/src/test/java/org/onap/aai/AAISetup.java @@ -40,6 +40,7 @@ import org.onap.aai.rest.dsl.DslQueryProcessor; import org.onap.aai.rest.dsl.V1DslQueryProcessor; import org.onap.aai.rest.dsl.V2DslQueryProcessor; import org.onap.aai.rest.dsl.v1.DslListener; +import org.onap.aai.rest.notification.NotificationService; import org.onap.aai.rest.search.GremlinServerSingleton; import org.onap.aai.serialization.db.EdgeSerializer; import org.onap.aai.setup.AAIConfigTranslator; @@ -57,7 +58,8 @@ import org.springframework.test.context.junit4.rules.SpringMethodRule; classes = {ConfigConfiguration.class, AAIConfigTranslator.class, EdgeIngestor.class, EdgeSerializer.class, NodeIngestor.class, SpringContextAware.class, IntrospectionConfig.class, RestBeanConfig.class, SearchConfiguration.class, XmlFormatTransformerConfiguration.class, - GremlinServerSingleton.class, V1DslQueryProcessor.class, V2DslQueryProcessor.class, DslListener.class, org.onap.aai.rest.dsl.v2.DslListener.class}) + GremlinServerSingleton.class, V1DslQueryProcessor.class, V2DslQueryProcessor.class, DslListener.class, org.onap.aai.rest.dsl.v2.DslListener.class, + LoaderFactory.class, NotificationService.class}) @TestPropertySource( properties = {"schema.uri.base.path = /aai", "schema.ingest.file = src/test/resources/application-test.properties"}) diff --git a/aai-traversal/src/test/java/org/onap/aai/QueryParameterTest.java b/aai-traversal/src/test/java/org/onap/aai/QueryParameterTest.java index 817ba28..4e6ce81 100644 --- a/aai-traversal/src/test/java/org/onap/aai/QueryParameterTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/QueryParameterTest.java @@ -36,6 +36,9 @@ import org.onap.aai.config.PropertyPasswordConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; +import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.context.annotation.Import; @@ -51,6 +54,7 @@ import org.springframework.web.client.RestTemplate; classes = TraversalApp.class) @TestPropertySource(locations = "classpath:application-test.properties") @ContextConfiguration(initializers = PropertyPasswordConfiguration.class) +@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test @Import(TraversalTestConfiguration.class) public class QueryParameterTest { diff --git a/aai-traversal/src/test/java/org/onap/aai/SubgraphPruneTest.java b/aai-traversal/src/test/java/org/onap/aai/SubgraphPruneTest.java index 4aefa85..d6d385f 100644 --- a/aai-traversal/src/test/java/org/onap/aai/SubgraphPruneTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/SubgraphPruneTest.java @@ -31,6 +31,9 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.onap.aai.config.PropertyPasswordConfiguration; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; +import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.context.annotation.Import; @@ -46,6 +49,7 @@ import org.springframework.web.client.RestTemplate; classes = TraversalApp.class) @TestPropertySource(locations = "classpath:application-test.properties") @ContextConfiguration(initializers = PropertyPasswordConfiguration.class) +@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test @Import(TraversalTestConfiguration.class) public class SubgraphPruneTest { diff --git a/aai-traversal/src/test/java/org/onap/aai/TraversalTestConfiguration.java b/aai-traversal/src/test/java/org/onap/aai/TraversalTestConfiguration.java index 4a03c03..8e2e823 100644 --- a/aai-traversal/src/test/java/org/onap/aai/TraversalTestConfiguration.java +++ b/aai-traversal/src/test/java/org/onap/aai/TraversalTestConfiguration.java @@ -33,6 +33,9 @@ import org.apache.http.ssl.SSLContextBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; +import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.context.annotation.Bean; @@ -46,6 +49,7 @@ import org.springframework.web.client.ResponseErrorHandler; import org.springframework.web.client.RestTemplate; @TestConfiguration +@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test public class TraversalTestConfiguration { private static final Logger logger = LoggerFactory.getLogger(TraversalTestConfiguration.class); diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/BadQueryFormatTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/BadQueryFormatTest.java index 1efbce7..6580c74 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/BadQueryFormatTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/BadQueryFormatTest.java @@ -37,6 +37,9 @@ import org.onap.aai.TraversalApp; import org.onap.aai.TraversalTestConfiguration; import org.onap.aai.config.PropertyPasswordConfiguration; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; +import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.context.annotation.Import; @@ -52,6 +55,7 @@ import org.springframework.web.client.RestTemplate; classes = TraversalApp.class) @TestPropertySource(locations = "classpath:application-test.properties") @ContextConfiguration(initializers = PropertyPasswordConfiguration.class) +@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test @Import(TraversalTestConfiguration.class) public class BadQueryFormatTest { diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java index 0992519..a892522 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java @@ -35,6 +35,9 @@ import org.onap.aai.config.SpringContextAware; import org.onap.aai.restclient.PropertyPasswordConfiguration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; +import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Import; @@ -57,6 +60,7 @@ import io.prometheus.client.exporter.common.TextFormat; @SpringBootTest( webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = {SpringContextAware.class, TraversalApp.class}) +@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test public class ConfigurationTest extends AbstractSpringRestTest { @Autowired RestTemplate restTemplate; diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/QueryConsumerTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/QueryConsumerTest.java index a6da4fc..e75019a 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/QueryConsumerTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/QueryConsumerTest.java @@ -49,6 +49,9 @@ import org.onap.aai.exceptions.AAIException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; +import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.context.annotation.Import; @@ -65,6 +68,7 @@ import org.springframework.web.client.RestTemplate; classes = TraversalApp.class) @TestPropertySource(locations = "classpath:application-test.properties") @ContextConfiguration(initializers = PropertyPasswordConfiguration.class) +@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test @Import({TraversalTestConfiguration.class, WebClientConfiguration.class}) public class QueryConsumerTest { diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/history/AbstractSpringHistoryRestTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/history/AbstractSpringHistoryRestTest.java index 5e397dd..9fdce03 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/history/AbstractSpringHistoryRestTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/history/AbstractSpringHistoryRestTest.java @@ -36,6 +36,9 @@ import org.onap.aai.exceptions.AAIException; import org.onap.aai.nodes.NodeIngestor; import org.onap.aai.util.AAIConfig; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; +import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.context.annotation.Import; @@ -55,6 +58,7 @@ import org.springframework.web.client.RestTemplate; locations = "classpath:application-test.properties", properties = {"history.enabled=true", "history.truncate.window.days = " + Integer.MAX_VALUE}) @ContextConfiguration(initializers = PropertyPasswordConfiguration.class) +@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test @Import(TraversalTestConfiguration.class) public abstract class AbstractSpringHistoryRestTest { diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/search/OnapQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/OnapQueryTest.java index 44264c1..32f9d76 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/search/OnapQueryTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/OnapQueryTest.java @@ -80,7 +80,7 @@ import org.springframework.test.context.junit4.rules.SpringMethodRule; @ContextConfiguration( classes = {ConfigConfiguration.class, AAIConfigTranslator.class, EdgeIngestor.class, EdgeSerializer.class, NodeIngestor.class, SpringContextAware.class, - SearchConfiguration.class, IntrospectionConfig.class}) + SearchConfiguration.class, IntrospectionConfig.class, LoaderFactory.class}) @TestPropertySource( properties = {"schema.uri.base.path = /aai", "schema.ingest.file = src/test/resources/application-onap-test.properties"}) diff --git a/aai-traversal/src/test/java/org/onap/aai/rest/search/QueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/QueryTest.java index 4574ca1..2cbc1cd 100644 --- a/aai-traversal/src/test/java/org/onap/aai/rest/search/QueryTest.java +++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/QueryTest.java @@ -59,6 +59,7 @@ import org.onap.aai.introspection.LoaderFactory; import org.onap.aai.introspection.ModelType; import org.onap.aai.nodes.NodeIngestor; import org.onap.aai.query.builder.GremlinTraversal; +import org.onap.aai.rest.notification.NotificationService; import org.onap.aai.restcore.search.GremlinGroovyShell; import org.onap.aai.restcore.search.GroovyQueryBuilder; import org.onap.aai.serialization.db.EdgeSerializer; @@ -80,7 +81,7 @@ import org.springframework.test.context.junit4.rules.SpringMethodRule; @ContextConfiguration( classes = {ConfigConfiguration.class, AAIConfigTranslator.class, EdgeIngestor.class, EdgeSerializer.class, NodeIngestor.class, SpringContextAware.class, - SearchConfiguration.class, IntrospectionConfig.class}) + SearchConfiguration.class, IntrospectionConfig.class, LoaderFactory.class, NotificationService.class}) @TestPropertySource( properties = {"schema.uri.base.path = /aai", "schema.ingest.file = src/test/resources/application-test.properties"}) diff --git a/pom.xml b/pom.xml index 13cdb8f..5e19faf 100644 --- a/pom.xml +++ b/pom.xml @@ -26,11 +26,11 @@ org.onap.aai.aai-common aai-parent - 1.14.4 + 1.14.5 org.onap.aai.traversal traversal - 1.14.4-SNAPSHOT + 1.14.5-SNAPSHOT aai-traversal pom @@ -41,7 +41,7 @@ Nexus Proxy Properties and Snapshot Locations Ideally this can be overwritten at runtime per internal environment specific values at runtime --> - 1.14.4 + 1.14.5 https://nexus.onap.org /content/sites/site/org/onap/aai/traversal/${project.artifactId}/${project.version} /content/repositories/releases/ diff --git a/test_csvWriter.csv b/test_csvWriter.csv deleted file mode 100644 index 2f66fec..0000000 --- a/test_csvWriter.csv +++ /dev/null @@ -1,2 +0,0 @@ -s0,s1 -t0,t1 diff --git a/version.properties b/version.properties index 82f9610..0f5234a 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ major_version=1 minor_version=14 -patch_version=4 +patch_version=5 base_version=${major_version}.${minor_version}.${patch_version} -- cgit 1.2.3-korg