From 875d5ca25cf09bbf80a8493639f2abfc501fc844 Mon Sep 17 00:00:00 2001 From: "adheli.tavares" Date: Mon, 18 Dec 2023 17:52:52 +0000 Subject: Allow topics to be registered with lower case for kafka compability Issue-ID: POLICY-4402 Change-Id: Ia2fabc3eed64bc8ecbdf1ab048a2101ee31daf04 Signed-off-by: adheli.tavares --- .../src/test/java/org/onap/policy/pap/main/comm/PublisherTest.java | 2 +- .../java/org/onap/policy/pap/main/parameters/CommonTestData.java | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'main/src/test/java') diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/PublisherTest.java b/main/src/test/java/org/onap/policy/pap/main/comm/PublisherTest.java index 6ef828bf..4eeeae1d 100644 --- a/main/src/test/java/org/onap/policy/pap/main/comm/PublisherTest.java +++ b/main/src/test/java/org/onap/policy/pap/main/comm/PublisherTest.java @@ -58,7 +58,7 @@ public class PublisherTest extends Threaded { private static final String JSON1; private static final String JSON2; - protected static final String PDP_PAP_TOPIC = "POLICY-PDP-PAP"; + protected static final String PDP_PAP_TOPIC = "policy-pdp-pap"; static { try { diff --git a/main/src/test/java/org/onap/policy/pap/main/parameters/CommonTestData.java b/main/src/test/java/org/onap/policy/pap/main/parameters/CommonTestData.java index 130f1efc..fad82c76 100644 --- a/main/src/test/java/org/onap/policy/pap/main/parameters/CommonTestData.java +++ b/main/src/test/java/org/onap/policy/pap/main/parameters/CommonTestData.java @@ -25,7 +25,6 @@ package org.onap.policy.pap.main.parameters; import java.io.File; import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import org.onap.policy.common.utils.coder.Coder; @@ -75,7 +74,7 @@ public class CommonTestData { try { File file = new File(getParamFile()); - String json = new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8); + String json = Files.readString(file.toPath()); json = json.replace("${port}", String.valueOf(port)); json = json.replace("${dbName}", "jdbc:h2:mem:testdb" + dbNum); @@ -110,8 +109,8 @@ public class CommonTestData { } /** - * Gets the full path to the parameter file, which may vary depending on whether or - * not this is an end-to-end test. + * Gets the full path to the parameter file, which may vary depending on whether + * this is an end-to-end test. * * @return the parameter file name */ -- cgit