summaryrefslogtreecommitdiffstats
path: root/aai-traversal/src
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-07-23 11:23:31 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-08-06 08:45:56 +0200
commitc25e03220c4da06aba6ebf6d9d1bd29f89e8f0b2 (patch)
tree46b36ac4f743de6f6557a97438de17db8508918e /aai-traversal/src
parent32bf6a5e346aa7786983cd78a2b70db15eb0b237 (diff)
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 <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-traversal/src')
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/TraversalApp.java14
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/AAIGremlinQueryTest.java4
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/AAISetup.java4
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/QueryParameterTest.java4
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/SubgraphPruneTest.java4
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/TraversalTestConfiguration.java4
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/BadQueryFormatTest.java4
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/ConfigurationTest.java4
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/QueryConsumerTest.java4
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/history/AbstractSpringHistoryRestTest.java4
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/OnapQueryTest.java2
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/QueryTest.java3
12 files changed, 49 insertions, 6 deletions
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"})