Fix for local tests failing for module mso-vnfm-etsi-adapter 87/102387/1
authorAndrewLamb <andrew.a.lamb@est.tech>
Wed, 26 Feb 2020 09:08:36 +0000 (09:08 +0000)
committerAndrewLamb <andrew.a.lamb@est.tech>
Wed, 26 Feb 2020 09:31:44 +0000 (09:31 +0000)
Change-Id: Ia20852b57f079361b39cb090f6170e84b0135e52
Issue-ID: SO-2679
Signed-off-by: AndrewLamb <andrew.a.lamb@est.tech>
adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/EtsiSubscriptionNotificationControllerTest.java

index 8012f7e..322251e 100644 (file)
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.onap.so.adapters.vnfmadapter.Constants.ETSI_SUBSCRIPTION_NOTIFICATION_CONTROLLER_BASE_URL;
 import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import static org.springframework.test.annotation.DirtiesContext.ClassMode.BEFORE_CLASS;
 import static org.springframework.test.web.client.match.MockRestRequestMatchers.*;
 import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
 import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
@@ -57,6 +58,7 @@ import org.springframework.boot.web.server.LocalServerPort;
 import org.springframework.cache.Cache;
 import org.springframework.cache.CacheManager;
 import org.springframework.http.*;
+import org.springframework.test.annotation.DirtiesContext;
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit4.SpringRunner;
 import org.springframework.test.web.client.MockRestServiceServer;
@@ -74,6 +76,7 @@ import com.google.gson.GsonBuilder;
 @RunWith(SpringRunner.class)
 @SpringBootTest(classes = VnfmAdapterApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 @ActiveProfiles("test")
+@DirtiesContext(classMode = BEFORE_CLASS)
 public class EtsiSubscriptionNotificationControllerTest {
 
     @LocalServerPort