X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=dashboard%2Fwebapp-backend%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fric%2Fportal%2Fdashboard%2FDashboardTestServer.java;h=e19890be8005c62c2bc73346c34c6a6925a200d2;hb=592ce20ec359928373de2e7f06214c8f8ad73c20;hp=df1a51c829bad176e89bed98d38946f9f4ef6b1d;hpb=3b1e23945b9426ad7aaacfc3794e15286d82c816;p=nonrtric.git diff --git a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java index df1a51c8..e19890be 100644 --- a/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java +++ b/dashboard/webapp-backend/src/test/java/org/oransc/ric/portal/dashboard/DashboardTestServer.java @@ -19,7 +19,10 @@ */ package org.oransc.ric.portal.dashboard; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.lang.invoke.MethodHandles; + import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfSystemProperty; import org.junit.jupiter.api.extension.ExtendWith; @@ -27,7 +30,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; -import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit.jupiter.SpringExtension; /** @@ -45,25 +47,25 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; */ @ExtendWith(SpringExtension.class) @SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT) -@ActiveProfiles("test") public class DashboardTestServer { - private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - /* - * Keeps the test server alive forever. Use a guard so this test is never run by - * Jenkins. - */ - @EnabledIfSystemProperty(named = "org.oransc.ric.portal.dashboard", matches = "mock") - @Test - public void keepServerAlive() { - logger.warn("Keeping server alive!"); - try { - synchronized (this) { - this.wait(); - } - } catch (Exception ex) { - logger.warn(ex.toString()); - } - } + /* + * Keeps the test server alive forever. Use a guard so this test is never run by + * Jenkins. + */ + @EnabledIfSystemProperty(named = "org.oransc.ric.portal.dashboard", matches = "mock") + @Test + public void keepServerAlive() { + logger.warn("Keeping server alive!"); + try { + synchronized (this) { + this.wait(); + } + } catch (Exception ex) { + logger.warn(ex.toString()); + } + assertEquals(1, 2); + } }