diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-12-16 10:31:00 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-12-16 11:06:57 +0000 |
commit | ba4a59a13e77a85d2c27398fe7314af6a80dad9e (patch) | |
tree | 31080c49e8edc44049bdbf6134616f87d9bfbabf /vid-app-common | |
parent | 4a42937926e558e61364998c626b86e1e56708e6 (diff) |
Fix intermittent test failure
Test whenReadVnfNodeWithVfModule_thenNodeIsAsExpected errors
at https://jenkins.onap.org/view/vid/job/vid-maven-stage-master/209
Change-Id: Id67ce0385436a72d79f9d6b2784d97131d6e02c3
Issue-ID: VID-253
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java index 2c954b297..29041839a 100644 --- a/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java @@ -30,6 +30,7 @@ import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.when; import static org.onap.vid.services.AAIServiceTree.AAI_TREE_PATHS; +import static org.onap.vid.testUtils.TestUtils.initMockitoMocks; import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; @@ -52,7 +53,6 @@ import java.util.concurrent.Executors; import org.apache.commons.lang3.tuple.Pair; import org.jetbrains.annotations.NotNull; import org.mockito.Mock; -import org.mockito.MockitoAnnotations; import org.mockito.stubbing.Answer; import org.onap.vid.aai.AaiClientInterface; import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship; @@ -66,7 +66,7 @@ import org.onap.vid.utils.Logging; import org.onap.vid.utils.Tree; import org.onap.vid.utils.Unchecked; import org.springframework.http.HttpMethod; -import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -82,9 +82,9 @@ public class AAITreeNodeBuilderTest { private static final ObjectMapper mapper = new ObjectMapper(); - @BeforeClass + @BeforeMethod public void initMocks() { - MockitoAnnotations.initMocks(this); + initMockitoMocks(this); aaiTreeNodeBuilder = new AAITreeNodeBuilder(aaiClientMock, logging); executorService = MoreExecutors.newDirectExecutorService(); } |