diff options
author | 2020-10-05 17:14:19 -0400 | |
---|---|---|
committer | 2020-10-05 18:59:24 -0400 | |
commit | f37711b80687119eb1a5db0c0621312f61a9bd3d (patch) | |
tree | 146c803f7d0e2631206e4e0ca09ffbb4cb4c0d55 /src/test | |
parent | 207a84b864cf11234821764af59723ae18c3f50a (diff) |
Updated the reference to aai-core latest version 1.6.11
Issue-ID: AAI-3100
Signed-off-by: kuldipr <kuldip.rai@amdocs.com>
Change-Id: I02248634b1dccda39a5fc5623005b2fcc9b8ac13
Diffstat (limited to 'src/test')
17 files changed, 57 insertions, 8 deletions
diff --git a/src/test/java/org/onap/aai/datasnapshot/DataSnapshotTest.java b/src/test/java/org/onap/aai/datasnapshot/DataSnapshotTest.java index ad27188..2ad8bb3 100644 --- a/src/test/java/org/onap/aai/datasnapshot/DataSnapshotTest.java +++ b/src/test/java/org/onap/aai/datasnapshot/DataSnapshotTest.java @@ -29,6 +29,8 @@ import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.dbmap.AAIGraph; import org.onap.aai.exceptions.AAIException; @@ -51,6 +53,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.*; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class DataSnapshotTest extends AAISetup { private GraphTraversalSource g; @@ -410,4 +413,4 @@ public class DataSnapshotTest extends AAISetup { FileUtils.copyFile(inputFile, outputFile); } -}
\ No newline at end of file +} diff --git a/src/test/java/org/onap/aai/migration/EdgeMigratorTest.java b/src/test/java/org/onap/aai/migration/EdgeMigratorTest.java index 299d017..6ca85de 100644 --- a/src/test/java/org/onap/aai/migration/EdgeMigratorTest.java +++ b/src/test/java/org/onap/aai/migration/EdgeMigratorTest.java @@ -30,6 +30,8 @@ import org.javatuples.Pair; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; + import org.mockito.Mockito; import org.onap.aai.AAISetup; import org.onap.aai.db.props.AAIProperties; @@ -51,6 +53,7 @@ import static org.junit.Assert.*; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class EdgeMigratorTest extends AAISetup { public static class EdgeMigratorImpl extends EdgeMigrator { @@ -232,4 +235,4 @@ public class EdgeMigratorTest extends AAISetup { assertEquals(0, edgeMigrator.edgeMissingParentProperty.size()); assertEquals(1, edgeMigrator.edgeMultiplicityExceptionCtr.values().stream().mapToInt(Number::intValue).sum()); } -}
\ No newline at end of file +} diff --git a/src/test/java/org/onap/aai/migration/EdgeSwingMigratorTest.java b/src/test/java/org/onap/aai/migration/EdgeSwingMigratorTest.java index 54b11b5..8319d82 100644 --- a/src/test/java/org/onap/aai/migration/EdgeSwingMigratorTest.java +++ b/src/test/java/org/onap/aai/migration/EdgeSwingMigratorTest.java @@ -29,6 +29,8 @@ import org.janusgraph.core.schema.JanusGraphManagement; import org.javatuples.Pair; import org.junit.Before; import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; + import org.mockito.Mockito; import org.onap.aai.AAISetup; import org.onap.aai.edges.EdgeIngestor; @@ -49,6 +51,7 @@ import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class EdgeSwingMigratorTest extends AAISetup { private final static ModelType introspectorFactoryType = ModelType.MOXY; diff --git a/src/test/java/org/onap/aai/migration/MigrationControllerInternalTest.java b/src/test/java/org/onap/aai/migration/MigrationControllerInternalTest.java index 9701217..5ec780e 100644 --- a/src/test/java/org/onap/aai/migration/MigrationControllerInternalTest.java +++ b/src/test/java/org/onap/aai/migration/MigrationControllerInternalTest.java @@ -28,6 +28,8 @@ import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.dbmap.AAIGraph; import java.io.ByteArrayOutputStream; @@ -35,7 +37,7 @@ import java.io.PrintStream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.StringContains.containsString; - +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class MigrationControllerInternalTest extends AAISetup { private static final Logger logger = LoggerFactory.getLogger(MigrationControllerInternalTest.class); diff --git a/src/test/java/org/onap/aai/migration/RebuildAllEdgesTest.java b/src/test/java/org/onap/aai/migration/RebuildAllEdgesTest.java index 0585a19..1cf7f8e 100644 --- a/src/test/java/org/onap/aai/migration/RebuildAllEdgesTest.java +++ b/src/test/java/org/onap/aai/migration/RebuildAllEdgesTest.java @@ -28,6 +28,8 @@ import org.janusgraph.core.schema.JanusGraphManagement; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; + import org.mockito.Mockito; import org.onap.aai.AAISetup; import org.onap.aai.introspection.Loader; @@ -39,6 +41,7 @@ import org.onap.aai.serialization.engines.TransactionalGraphEngine; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.*; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class RebuildAllEdgesTest extends AAISetup { private static final ModelType introspectorFactoryType = ModelType.MOXY; @@ -89,4 +92,4 @@ public class RebuildAllEdgesTest extends AAISetup { } -
\ No newline at end of file + diff --git a/src/test/java/org/onap/aai/migration/ValueMigratorTest.java b/src/test/java/org/onap/aai/migration/ValueMigratorTest.java index 2b29adb..af57a48 100644 --- a/src/test/java/org/onap/aai/migration/ValueMigratorTest.java +++ b/src/test/java/org/onap/aai/migration/ValueMigratorTest.java @@ -25,6 +25,8 @@ import org.janusgraph.core.JanusGraphFactory; import org.janusgraph.core.JanusGraphTransaction; import org.junit.Before; import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.edges.EdgeIngestor; import org.onap.aai.introspection.Loader; @@ -44,6 +46,7 @@ import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class ValueMigratorTest extends AAISetup{ public static class SampleValueMigrator extends ValueMigrator { diff --git a/src/test/java/org/onap/aai/migration/v12/ALTSLicenseEntitlementMigrationTest.java b/src/test/java/org/onap/aai/migration/v12/ALTSLicenseEntitlementMigrationTest.java index e833b90..5582a02 100644 --- a/src/test/java/org/onap/aai/migration/v12/ALTSLicenseEntitlementMigrationTest.java +++ b/src/test/java/org/onap/aai/migration/v12/ALTSLicenseEntitlementMigrationTest.java @@ -27,6 +27,8 @@ import java.io.UnsupportedEncodingException; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.*; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.db.props.AAIProperties; import org.onap.aai.dbmap.DBConnectionType; @@ -42,6 +44,7 @@ import org.janusgraph.core.JanusGraphFactory; import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphTransaction; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class ALTSLicenseEntitlementMigrationTest extends AAISetup { private final static ModelType introspectorFactoryType = ModelType.MOXY; private final static QueryStyle queryStyle = QueryStyle.TRAVERSAL; diff --git a/src/test/java/org/onap/aai/migration/v12/ContainmentDeleteOtherVPropertyMigrationTest.java b/src/test/java/org/onap/aai/migration/v12/ContainmentDeleteOtherVPropertyMigrationTest.java index 8861d5d..8dc6cc2 100644 --- a/src/test/java/org/onap/aai/migration/v12/ContainmentDeleteOtherVPropertyMigrationTest.java +++ b/src/test/java/org/onap/aai/migration/v12/ContainmentDeleteOtherVPropertyMigrationTest.java @@ -29,6 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; + import org.mockito.Mockito; import org.onap.aai.AAISetup; import org.onap.aai.dbmap.DBConnectionType; @@ -46,6 +48,7 @@ import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class ContainmentDeleteOtherVPropertyMigrationTest extends AAISetup { private final static ModelType introspectorFactoryType = ModelType.MOXY; diff --git a/src/test/java/org/onap/aai/migration/v12/MigrateDataFromASDCToConfigurationTest.java b/src/test/java/org/onap/aai/migration/v12/MigrateDataFromASDCToConfigurationTest.java index 545576d..67f28a4 100644 --- a/src/test/java/org/onap/aai/migration/v12/MigrateDataFromASDCToConfigurationTest.java +++ b/src/test/java/org/onap/aai/migration/v12/MigrateDataFromASDCToConfigurationTest.java @@ -27,6 +27,8 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.dbmap.DBConnectionType; import org.onap.aai.introspection.Loader; @@ -41,6 +43,7 @@ import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class MigrateDataFromASDCToConfigurationTest extends AAISetup { private final static ModelType introspectorFactoryType = ModelType.MOXY; diff --git a/src/test/java/org/onap/aai/migration/v12/MigrateHUBEvcInventoryTest.java b/src/test/java/org/onap/aai/migration/v12/MigrateHUBEvcInventoryTest.java index 33afbfd..07d87cd 100644 --- a/src/test/java/org/onap/aai/migration/v12/MigrateHUBEvcInventoryTest.java +++ b/src/test/java/org/onap/aai/migration/v12/MigrateHUBEvcInventoryTest.java @@ -33,6 +33,8 @@ import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.dbmap.DBConnectionType; import org.onap.aai.introspection.Loader; @@ -48,6 +50,7 @@ import org.janusgraph.core.JanusGraphFactory; import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphTransaction; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class MigrateHUBEvcInventoryTest extends AAISetup { private final static ModelType introspectorFactoryType = ModelType.MOXY; diff --git a/src/test/java/org/onap/aai/migration/v12/MigrateINVPhysicalInventoryMethodTest.java b/src/test/java/org/onap/aai/migration/v12/MigrateINVPhysicalInventoryMethodTest.java index 25d7bc7..ac66a82 100644 --- a/src/test/java/org/onap/aai/migration/v12/MigrateINVPhysicalInventoryMethodTest.java +++ b/src/test/java/org/onap/aai/migration/v12/MigrateINVPhysicalInventoryMethodTest.java @@ -26,6 +26,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy; import org.javatuples.Pair; import org.junit.*; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.dbmap.DBConnectionType; import org.onap.aai.introspection.Loader; @@ -42,6 +44,7 @@ import static org.junit.Assert.*; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class MigrateINVPhysicalInventoryMethodTest extends AAISetup { private final static ModelType introspectorFactoryType = ModelType.MOXY; diff --git a/src/test/java/org/onap/aai/migration/v12/MigrateINVPhysicalInventoryTest.java b/src/test/java/org/onap/aai/migration/v12/MigrateINVPhysicalInventoryTest.java index aae92d4..999edd9 100644 --- a/src/test/java/org/onap/aai/migration/v12/MigrateINVPhysicalInventoryTest.java +++ b/src/test/java/org/onap/aai/migration/v12/MigrateINVPhysicalInventoryTest.java @@ -26,6 +26,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.*; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.dbmap.DBConnectionType; import org.onap.aai.introspection.Loader; @@ -41,7 +43,7 @@ import java.util.Optional; import static org.junit.Assert.*; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; - +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class MigrateINVPhysicalInventoryTest extends AAISetup { private final static ModelType introspectorFactoryType = ModelType.MOXY; diff --git a/src/test/java/org/onap/aai/migration/v12/MigrateInvEvcInventoryTest.java b/src/test/java/org/onap/aai/migration/v12/MigrateInvEvcInventoryTest.java index f895c34..d8974b6 100644 --- a/src/test/java/org/onap/aai/migration/v12/MigrateInvEvcInventoryTest.java +++ b/src/test/java/org/onap/aai/migration/v12/MigrateInvEvcInventoryTest.java @@ -31,6 +31,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.*; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.dbmap.DBConnectionType; import org.onap.aai.introspection.Loader; @@ -45,6 +47,7 @@ import org.janusgraph.core.JanusGraphFactory; import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphTransaction; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class MigrateInvEvcInventoryTest extends AAISetup { private final static ModelType introspectorFactoryType = ModelType.MOXY; diff --git a/src/test/java/org/onap/aai/migration/v12/MigratePATHEvcInventoryTest.java b/src/test/java/org/onap/aai/migration/v12/MigratePATHEvcInventoryTest.java index b387f38..9c8233f 100644 --- a/src/test/java/org/onap/aai/migration/v12/MigratePATHEvcInventoryTest.java +++ b/src/test/java/org/onap/aai/migration/v12/MigratePATHEvcInventoryTest.java @@ -31,6 +31,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.junit.*; +import org.springframework.test.annotation.DirtiesContext; + import org.onap.aai.AAISetup; import org.onap.aai.dbmap.DBConnectionType; import org.onap.aai.introspection.Loader; @@ -41,6 +43,7 @@ import org.onap.aai.serialization.engines.QueryStyle; import org.onap.aai.serialization.engines.JanusGraphDBEngine; import org.onap.aai.serialization.engines.TransactionalGraphEngine; +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class MigratePATHEvcInventoryTest extends AAISetup { private final static ModelType introspectorFactoryType = ModelType.MOXY; diff --git a/src/test/java/org/onap/aai/migration/v13/MigrateInMaintDefaultToFalseTest.java b/src/test/java/org/onap/aai/migration/v13/MigrateInMaintDefaultToFalseTest.java index 4e6b127..fe563ca 100644 --- a/src/test/java/org/onap/aai/migration/v13/MigrateInMaintDefaultToFalseTest.java +++ b/src/test/java/org/onap/aai/migration/v13/MigrateInMaintDefaultToFalseTest.java @@ -33,6 +33,8 @@ import org.janusgraph.core.schema.JanusGraphManagement; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.junit.Before;
import org.junit.Test;
+import org.springframework.test.annotation.DirtiesContext;
+
import org.onap.aai.AAISetup;
import org.onap.aai.dbmap.DBConnectionType;
import org.onap.aai.introspection.Loader;
@@ -57,6 +59,7 @@ import java.util.Optional; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
+@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
public class MigrateInMaintDefaultToFalseTest extends
AAISetup {
protected static final String VNF_NODE_TYPE = "generic-vnf";
@@ -407,4 +410,4 @@ public class MigrateInMaintDefaultToFalseTest extends assertTrue("Value of nos-server shouldn't be updated since in-maint already exists",
g.V().has("aai-node-type", "nos-server").has("nos-server-id", "nos-server3").has("in-maint", false).hasNext());
}
-}
\ No newline at end of file +}
diff --git a/src/test/java/org/onap/aai/util/SendDeleteMigrationNotificationsTest.java b/src/test/java/org/onap/aai/util/SendDeleteMigrationNotificationsTest.java index 5df4a75..8f43e60 100644 --- a/src/test/java/org/onap/aai/util/SendDeleteMigrationNotificationsTest.java +++ b/src/test/java/org/onap/aai/util/SendDeleteMigrationNotificationsTest.java @@ -25,6 +25,8 @@ import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphFactory; import org.janusgraph.core.JanusGraphTransaction; import org.junit.*; +import org.springframework.test.annotation.DirtiesContext; + import org.junit.runners.MethodSorters; import org.mockito.Mockito; import org.onap.aai.AAISetup; @@ -45,6 +47,7 @@ import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.*; @FixMethodOrder(MethodSorters.NAME_ASCENDING) +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class SendDeleteMigrationNotificationsTest extends AAISetup { private final static String FILE = "./test.txt"; @@ -163,4 +166,4 @@ public class SendDeleteMigrationNotificationsTest extends AAISetup { } -}
\ No newline at end of file +} diff --git a/src/test/java/org/onap/aai/util/SendMigrationNotificationsTest.java b/src/test/java/org/onap/aai/util/SendMigrationNotificationsTest.java index c7ca3d3..72a2185 100644 --- a/src/test/java/org/onap/aai/util/SendMigrationNotificationsTest.java +++ b/src/test/java/org/onap/aai/util/SendMigrationNotificationsTest.java @@ -25,6 +25,8 @@ import org.janusgraph.core.JanusGraph; import org.janusgraph.core.JanusGraphFactory; import org.janusgraph.core.JanusGraphTransaction; import org.junit.*; +import org.springframework.test.annotation.DirtiesContext; + import org.junit.runners.MethodSorters; import org.mockito.Mockito; import org.onap.aai.AAISetup; @@ -43,6 +45,7 @@ import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.*; @FixMethodOrder(MethodSorters.NAME_ASCENDING) +@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS) public class SendMigrationNotificationsTest extends AAISetup { private final static String FILE = "./test.txt"; @@ -186,4 +189,4 @@ public class SendMigrationNotificationsTest extends AAISetup { } -}
\ No newline at end of file +} |