From a593d0931f9a5785572bb52c5dfae32faa5d8116 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 8 Jul 2019 10:21:36 -0400 Subject: Fix drools-pdp due to sonar changes in common Fixed breakages due to changes made in policy/common to satisfy sonar. Change-Id: I26a38340707b2903e089350c31c5dfdb5c019ee0 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn --- .../org/onap/policy/drools/simulators/DMaaPSimulatorTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'feature-simulators/src') diff --git a/feature-simulators/src/test/java/org/onap/policy/drools/simulators/DMaaPSimulatorTest.java b/feature-simulators/src/test/java/org/onap/policy/drools/simulators/DMaaPSimulatorTest.java index 2a849525..9740ac6d 100644 --- a/feature-simulators/src/test/java/org/onap/policy/drools/simulators/DMaaPSimulatorTest.java +++ b/feature-simulators/src/test/java/org/onap/policy/drools/simulators/DMaaPSimulatorTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-simulators * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,6 +37,7 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.onap.policy.common.endpoints.http.server.HttpServletServer; +import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance; import org.onap.policy.common.utils.network.NetworkUtil; import org.onap.policy.drools.utils.logging.LoggerUtil; @@ -52,8 +53,8 @@ public class DMaaPSimulatorTest { LoggerUtil.setLevel("ROOT", "INFO"); LoggerUtil.setLevel("org.eclipse.jetty", "WARN"); try { - final HttpServletServer testServer = - HttpServletServer.factory.build("dmaapSim", "localhost", DMAAPSIM_SERVER_PORT, "/", false, true); + final HttpServletServer testServer = HttpServletServerFactoryInstance.getServerFactory().build("dmaapSim", + "localhost", DMAAPSIM_SERVER_PORT, "/", false, true); testServer.addServletClass("/*", DMaaPSimulatorJaxRs.class.getName()); testServer.waitedStart(5000); if (!NetworkUtil.isTcpPortOpen("localhost", testServer.getPort(), 5, 10000L)) { @@ -66,7 +67,7 @@ public class DMaaPSimulatorTest { @AfterClass public static void tearDownSimulator() { - HttpServletServer.factory.destroy(); + HttpServletServerFactoryInstance.getServerFactory().destroy(); } @Test -- cgit 1.2.3-korg