X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=main%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpdpx%2Fmain%2Frest%2FTestXacmlPdpStatistics.java;h=595301de2f247a1aa506c78c11bdb30f9ca1a0d7;hb=b909b14fe88c5fe8f096cf8b471a2aa799d84739;hp=ee05ff06ee5b37a4e51b3597507a8666605232ad;hpb=4b2ef1a5a9bf92aeb7edc1512f7a6cd8e1be99d8;p=policy%2Fxacml-pdp.git diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpStatistics.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpStatistics.java index ee05ff06..595301de 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpStatistics.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpStatistics.java @@ -21,6 +21,7 @@ package org.onap.policy.pdpx.main.rest; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; @@ -32,6 +33,7 @@ import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; +import org.junit.BeforeClass; import org.junit.Test; import org.onap.policy.common.utils.network.NetworkUtil; import org.onap.policy.pdpx.main.PolicyXacmlPdpException; @@ -51,12 +53,19 @@ public class TestXacmlPdpStatistics { private static final Logger LOGGER = LoggerFactory.getLogger(TestXacmlPdpStatistics.class); + @BeforeClass + public static void beforeClass() { + System.setProperty("org.eclipse.jetty.util.log.class", "org.eclipse.jetty.util.log.StdErrLog"); + System.setProperty("org.eclipse.jetty.LEVEL", "OFF"); + } + @Test public void testXacmlPdpStatistics_200() throws PolicyXacmlPdpException, InterruptedException { try { final Main main = startXacmlPdpService(); StatisticsReport report = getXacmlPdpStatistics(); validateReport(report, 0, 200); + assertThat(report.getTotalPolicyTypesCount()).isGreaterThan(0); updateXacmlPdpStatistics(); report = getXacmlPdpStatistics(); validateReport(report, 1, 200);