diff options
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/onap/aai/spike/OXMModelLoaderSetup.java | 11 | ||||
-rw-r--r-- | src/test/java/org/onap/aai/spike/event/incoming/OffsetManagerTest.java | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/test/java/org/onap/aai/spike/OXMModelLoaderSetup.java b/src/test/java/org/onap/aai/spike/OXMModelLoaderSetup.java index 9315df8..837fa12 100644 --- a/src/test/java/org/onap/aai/spike/OXMModelLoaderSetup.java +++ b/src/test/java/org/onap/aai/spike/OXMModelLoaderSetup.java @@ -22,7 +22,9 @@ package org.onap.aai.spike; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.junit.Before; import org.mockito.Mock; import org.mockito.Mockito; @@ -32,6 +34,7 @@ import org.onap.aai.setup.AAIConfigTranslator; import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.setup.SchemaVersion; import org.onap.aai.setup.SchemaVersions; +import org.onap.aai.setup.Translator; import org.onap.aai.spike.schema.EdgePropsConfiguration; import org.onap.aai.spike.schema.EdgeRulesLoader; import org.onap.aai.spike.schema.OXMModelLoader; @@ -67,8 +70,12 @@ public class OXMModelLoaderSetup { Mockito.when(edgePropsConfiguration.getEdgePropsDir()).thenReturn("src/test/resources/edgeProps/"); AAIConfigTranslator aaiConfigTranslator = new AAIConfigTranslator(schemaLocationsBean, schemaVersions); - NodeIngestor nodeIngestor = new NodeIngestor(aaiConfigTranslator); - EdgeIngestor edgeIngestor = new EdgeIngestor(aaiConfigTranslator, schemaVersions); + Set<Translator> translators = new HashSet<>(); + translators.add(aaiConfigTranslator); + NodeIngestor nodeIngestor = new NodeIngestor(translators); + nodeIngestor.initialize(); + EdgeIngestor edgeIngestor = new EdgeIngestor(translators); + edgeIngestor.initialize(); edgeRulesLoader = new EdgeRulesLoader(aaiConfigTranslator, edgeIngestor, edgePropsConfiguration); oxmModelLoader = new OXMModelLoader(aaiConfigTranslator, nodeIngestor); } diff --git a/src/test/java/org/onap/aai/spike/event/incoming/OffsetManagerTest.java b/src/test/java/org/onap/aai/spike/event/incoming/OffsetManagerTest.java index 2190942..1ee106c 100644 --- a/src/test/java/org/onap/aai/spike/event/incoming/OffsetManagerTest.java +++ b/src/test/java/org/onap/aai/spike/event/incoming/OffsetManagerTest.java @@ -1,5 +1,5 @@ /** - * ============LICENSE_START======================================================= + * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. @@ -33,10 +33,10 @@ public class OffsetManagerTest { @Test public void testOffsetAdvancement() throws Exception { - final Long offsetPeriod = 500L; // ms + final Long offsetPeriod = 100L; // ms // Create an instance of the offset manager. - OffsetManager offsetManager = new OffsetManager(10, offsetPeriod); + OffsetManager offsetManager = new OffsetManager(5, offsetPeriod); // Now, cache some events as if we had consumed them and they // are in flight. |