X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fpolicyagent%2FApplicationTest.java;h=d274d5a30782fd7dda771f81b49fcfc401383ea0;hb=refs%2Fchanges%2F98%2F3498%2F1;hp=43cb96d586961dda4bf21c934030043605032862;hpb=3134679dec4f273afbb768c8ff71a5f50f5a6a4c;p=nonrtric.git diff --git a/policy-agent/src/test/java/org/oransc/policyagent/ApplicationTest.java b/policy-agent/src/test/java/org/oransc/policyagent/ApplicationTest.java index 43cb96d5..d274d5a3 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/ApplicationTest.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/ApplicationTest.java @@ -72,7 +72,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.context.TestConfiguration; +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.web.servlet.server.ServletWebServerFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.http.HttpStatus; @@ -164,6 +166,12 @@ public class ApplicationTest { Duration checkInterval = Duration.ofMillis(1); return new ServiceSupervision(this.services, this.policies, this.getA1ClientFactory(), checkInterval); } + + @Bean + public ServletWebServerFactory servletContainer() { + return new TomcatServletWebServerFactory(); + } + } @LocalServerPort @@ -670,7 +678,7 @@ public class ApplicationTest { return "{\"servingCellNrcgi\":\"1\"}"; } - // @Test TODO temporary disabled + @Test public void testConcurrency() throws Exception { final Instant startTime = Instant.now(); List threads = new ArrayList<>();