diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-08-05 09:08:41 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-08-05 09:11:43 +0200 |
commit | 5e3fb37e781d9a740b5d73384519158d10642d97 (patch) | |
tree | dd0278008f5e059c53206a6139d81025472f83f3 /aai-core/src/main/java | |
parent | a64f197927959af5764eeadba26f3b100702af9b (diff) |
Add test for transaction rollback in HttpEntry
- verify that transaction is rolled back when writing a request in a batch fails
- remove all unused imports
Issue-ID: AAI-3942
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I93cd1efa08db533a088e242694f07ff10db36b4e
Diffstat (limited to 'aai-core/src/main/java')
10 files changed, 10 insertions, 17 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/config/IntrospectionConfig.java b/aai-core/src/main/java/org/onap/aai/config/IntrospectionConfig.java index a9fcb880..a3411076 100644 --- a/aai-core/src/main/java/org/onap/aai/config/IntrospectionConfig.java +++ b/aai-core/src/main/java/org/onap/aai/config/IntrospectionConfig.java @@ -22,10 +22,9 @@ package org.onap.aai.config; -import java.util.*; +import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.onap.aai.introspection.LoaderFactory; import org.onap.aai.introspection.MoxyLoader; import org.onap.aai.setup.SchemaVersion; import org.onap.aai.setup.SchemaVersions; diff --git a/aai-core/src/main/java/org/onap/aai/config/SchemaConfiguration.java b/aai-core/src/main/java/org/onap/aai/config/SchemaConfiguration.java index 9247bc77..7547f4f7 100644 --- a/aai-core/src/main/java/org/onap/aai/config/SchemaConfiguration.java +++ b/aai-core/src/main/java/org/onap/aai/config/SchemaConfiguration.java @@ -25,10 +25,7 @@ package org.onap.aai.config; import org.onap.aai.edges.EdgeIngestor; import org.onap.aai.nodes.NodeIngestor; import org.onap.aai.serialization.db.EdgeSerializer; -import org.onap.aai.setup.AAIConfigTranslator; import org.onap.aai.setup.ConfigTranslator; -import org.onap.aai.setup.SchemaConfigVersions; -import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.validation.CheckEverythingStrategy; import org.onap.aai.validation.SchemaErrorStrategy; import org.onap.aai.validation.nodes.DefaultDuplicateNodeDefinitionValidationModule; @@ -36,7 +33,10 @@ import org.onap.aai.validation.nodes.DuplicateNodeDefinitionValidationModule; import org.onap.aai.validation.nodes.NodeValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.*; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.context.annotation.PropertySource; @Import({NodesConfiguration.class, EdgesConfiguration.class}) @Configuration diff --git a/aai-core/src/main/java/org/onap/aai/dbmap/AAIGraph.java b/aai-core/src/main/java/org/onap/aai/dbmap/AAIGraph.java index 73bbf7c1..0db67860 100644 --- a/aai-core/src/main/java/org/onap/aai/dbmap/AAIGraph.java +++ b/aai-core/src/main/java/org/onap/aai/dbmap/AAIGraph.java @@ -25,7 +25,6 @@ package org.onap.aai.dbmap; import java.io.FileNotFoundException; import java.util.Properties; -import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.commons.configuration2.Configuration; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.tinkerpop.gremlin.structure.Graph; diff --git a/aai-core/src/main/java/org/onap/aai/dbmap/InMemoryGraph.java b/aai-core/src/main/java/org/onap/aai/dbmap/InMemoryGraph.java index cca11c6d..6e4ce147 100644 --- a/aai-core/src/main/java/org/onap/aai/dbmap/InMemoryGraph.java +++ b/aai-core/src/main/java/org/onap/aai/dbmap/InMemoryGraph.java @@ -29,7 +29,6 @@ import org.apache.tinkerpop.gremlin.structure.io.IoCore; import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphFactory; import org.janusgraph.core.JanusGraphTransaction; -import org.janusgraph.core.schema.JanusGraphManagement; import org.onap.aai.dbgen.GraphSONPartialIO; import org.onap.aai.dbgen.SchemaGenerator; import org.onap.aai.logging.LogFormatTools; diff --git a/aai-core/src/main/java/org/onap/aai/introspection/MoxyLoader.java b/aai-core/src/main/java/org/onap/aai/introspection/MoxyLoader.java index 6099e1b4..ec3151b5 100644 --- a/aai-core/src/main/java/org/onap/aai/introspection/MoxyLoader.java +++ b/aai-core/src/main/java/org/onap/aai/introspection/MoxyLoader.java @@ -23,7 +23,7 @@ package org.onap.aai.introspection; import com.google.common.base.CaseFormat; import com.google.common.collect.ImmutableMap; -import java.io.*; +import java.io.StringReader; import java.util.HashSet; import java.util.Map; import java.util.Set; diff --git a/aai-core/src/main/java/org/onap/aai/kafka/AAIKafkaEventJMSProducer.java b/aai-core/src/main/java/org/onap/aai/kafka/AAIKafkaEventJMSProducer.java index a46f2e99..4e948772 100644 --- a/aai-core/src/main/java/org/onap/aai/kafka/AAIKafkaEventJMSProducer.java +++ b/aai-core/src/main/java/org/onap/aai/kafka/AAIKafkaEventJMSProducer.java @@ -23,7 +23,6 @@ package org.onap.aai.kafka; import org.json.JSONObject; -import org.onap.aai.util.AAIConfig; import org.springframework.beans.factory.annotation.Value; import org.springframework.jms.core.JmsTemplate; import org.springframework.stereotype.Service; diff --git a/aai-core/src/main/java/org/onap/aai/parsers/relationship/RelationshipToURI.java b/aai-core/src/main/java/org/onap/aai/parsers/relationship/RelationshipToURI.java index 8ed0fcb6..95b1517d 100644 --- a/aai-core/src/main/java/org/onap/aai/parsers/relationship/RelationshipToURI.java +++ b/aai-core/src/main/java/org/onap/aai/parsers/relationship/RelationshipToURI.java @@ -40,7 +40,10 @@ import org.onap.aai.edges.enums.EdgeType; import org.onap.aai.edges.exceptions.AmbiguousRuleChoiceException; import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException; import org.onap.aai.exceptions.AAIException; -import org.onap.aai.introspection.*; +import org.onap.aai.introspection.Introspector; +import org.onap.aai.introspection.IntrospectorFactory; +import org.onap.aai.introspection.Loader; +import org.onap.aai.introspection.ModelType; import org.onap.aai.introspection.exceptions.AAIUnknownObjectException; import org.onap.aai.parsers.exceptions.AAIIdentityMapParseException; import org.onap.aai.parsers.exceptions.AmbiguousMapAAIException; diff --git a/aai-core/src/main/java/org/onap/aai/query/builder/GremlinUnique.java b/aai-core/src/main/java/org/onap/aai/query/builder/GremlinUnique.java index 58495201..2b117c49 100644 --- a/aai-core/src/main/java/org/onap/aai/query/builder/GremlinUnique.java +++ b/aai-core/src/main/java/org/onap/aai/query/builder/GremlinUnique.java @@ -35,7 +35,6 @@ import org.onap.aai.introspection.Loader; import org.onap.aai.parsers.query.QueryParser; import org.onap.aai.parsers.query.TraversalStrategy; import org.onap.aai.parsers.query.UniqueStrategy; -import org.onap.aai.query.entities.PaginationResult; /** * The Class GremlinUnique. diff --git a/aai-core/src/main/java/org/onap/aai/serialization/db/EdgeSerializer.java b/aai-core/src/main/java/org/onap/aai/serialization/db/EdgeSerializer.java index 0c58717e..0d491c9d 100644 --- a/aai-core/src/main/java/org/onap/aai/serialization/db/EdgeSerializer.java +++ b/aai-core/src/main/java/org/onap/aai/serialization/db/EdgeSerializer.java @@ -20,9 +20,6 @@ package org.onap.aai.serialization.db; -import java.util.EnumMap; -import java.util.Map; -import java.util.Map.Entry; import java.util.Optional; import java.util.UUID; diff --git a/aai-core/src/main/java/org/onap/aai/util/delta/DeltaEvents.java b/aai-core/src/main/java/org/onap/aai/util/delta/DeltaEvents.java index b2821b04..39a03777 100644 --- a/aai-core/src/main/java/org/onap/aai/util/delta/DeltaEvents.java +++ b/aai-core/src/main/java/org/onap/aai/util/delta/DeltaEvents.java @@ -29,8 +29,6 @@ import java.util.Map; import org.onap.aai.db.props.AAIProperties; import org.onap.aai.kafka.MessageProducer; import org.onap.aai.util.AAIConfig; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import com.google.gson.FieldNamingPolicy; |