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=80a272f3a06bdc48b30d22d36505a9d10fcc74ca;hb=0bf1e8c65fb6b3c2a011e25587500fa45d50d6c0;hp=a6c0a1e34397dacf4a68fd416ebac6c6152b02d8;hpb=9de32bd6e23b01413d1319e668235568068b3699;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 a6c0a1e3..80a272f3 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 @@ -3,6 +3,7 @@ * O-RAN-SC * %% * Copyright (C) 2019 AT&T Intellectual Property + * Modifications Copyright (C) 2020 Nordix Foundation * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,9 +20,8 @@ */ 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; @@ -29,7 +29,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; /** @@ -49,23 +48,23 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; @SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT) 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()); - } - assertEquals(1, 2); - } + /* + * Keeps the test server alive forever. Use a guard so this test is never run by + * Jenkins. + */ + @SuppressWarnings("squid:S2699") // To avoid warning about missing assertion. + @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()); + } + } }