X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fpolicyagent%2FMockPolicyAgent.java;h=481a1fe1d6b2824c03b0cca45cda2b6456d55e21;hb=038a1a97ec72b7ec4fe3643440be6aa113bbadf4;hp=efbd57656f987d198c763d0c8ee72be2a09e58ce;hpb=5408c157fc8aca52731fcc2cc035ed9dbfcff219;p=nonrtric.git diff --git a/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java b/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java index efbd5765..481a1fe1 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java @@ -129,15 +129,13 @@ public class MockPolicyAgent { @LocalServerPort private int port; - private void keepServerAlive() { + private void keepServerAlive() throws InterruptedException { logger.info("Keeping server alive!"); - try { - synchronized (this) { - this.wait(); - } - } catch (Exception ex) { - logger.error("Unexpected: " + ex); + + synchronized (this) { + this.wait(); } + } private static String title(String jsonSchema) { @@ -147,7 +145,8 @@ public class MockPolicyAgent { } @Test - @SuppressWarnings("squid:S2699") // Tests should include assertions. This test is only for keeping the server alive, + @SuppressWarnings("squid:S2699") // Tests should include assertions. This test is only for keeping the server + // alive, // so it will only be confusing to add an assertion. public void runMock() throws Exception { keepServerAlive();