summaryrefslogtreecommitdiffstats
path: root/main/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/test')
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyComponentsHealthCheckProvider.java20
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/e2e/End2EndContext.java4
-rw-r--r--main/src/test/resources/application-test-e2e.yaml4
-rw-r--r--main/src/test/resources/parameters/MinimumParameters.json8
-rw-r--r--main/src/test/resources/parameters/PapConfigParameters.json4
-rw-r--r--main/src/test/resources/parameters/PapConfigParametersStd.json8
-rw-r--r--main/src/test/resources/parameters/PapConfigParameters_Postgres.json6
7 files changed, 27 insertions, 27 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyComponentsHealthCheckProvider.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyComponentsHealthCheckProvider.java
index 41597218..60712c06 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyComponentsHealthCheckProvider.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyComponentsHealthCheckProvider.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020, 2022-2023 Nordix Foundation.
+ * Copyright (C) 2020, 2022-2024 Nordix Foundation.
* Modifications Copyright (C) 2020-2021 AT&T Corp.
* Modifications Copyright (C) 2020-2022 Bell Canada. All rights reserved.
* ================================================================================
@@ -136,10 +136,10 @@ class TestPolicyComponentsHealthCheckProvider {
when(response2.readEntity(HealthCheckReport.class)).thenReturn(createReport(HttpURLConnection.HTTP_OK, true));
when(client2.get()).thenReturn(response2);
- when(client3.getName()).thenReturn("dmaap");
- when(client3.getBaseUrl()).thenReturn("message-router");
+ when(client3.getName()).thenReturn("kafka");
+ when(client3.getBaseUrl()).thenReturn("kafka");
when(response3.getStatus()).thenReturn(HttpURLConnection.HTTP_OK);
- when(response3.readEntity(DmaapGetTopicResponse.class)).thenReturn(createDmaapResponse());
+ when(response3.readEntity(KafkaGetTopicResponse.class)).thenReturn(createKafkaResponse());
when(client3.get()).thenReturn(response3);
List<HttpClient> clients = new ArrayList<>();
clients.add(client1);
@@ -193,17 +193,17 @@ class TestPolicyComponentsHealthCheckProvider {
assertFalse(report2.isHealthy());
when(response3.getStatus()).thenReturn(HttpURLConnection.HTTP_INTERNAL_ERROR);
- when(response3.readEntity(DmaapGetTopicResponse.class)).thenReturn(null);
+ when(response3.readEntity(KafkaGetTopicResponse.class)).thenReturn(null);
Map<String, Object> result3 = callFetchPolicyComponentsHealthStatus();
assertFalse((Boolean) result3.get(HEALTHY));
- HealthCheckReport report3 = (HealthCheckReport) result3.get("dmaap");
+ HealthCheckReport report3 = (HealthCheckReport) result3.get("kafka");
assertFalse(report3.isHealthy());
when(response3.getStatus()).thenReturn(HttpURLConnection.HTTP_OK);
- when(response3.readEntity(DmaapGetTopicResponse.class)).thenReturn(new DmaapGetTopicResponse());
+ when(response3.readEntity(KafkaGetTopicResponse.class)).thenReturn(new KafkaGetTopicResponse());
Map<String, Object> result4 = callFetchPolicyComponentsHealthStatus();
assertFalse((Boolean) result4.get(HEALTHY));
- HealthCheckReport report4 = (HealthCheckReport) result4.get("dmaap");
+ HealthCheckReport report4 = (HealthCheckReport) result4.get("kafka");
assertFalse(report4.isHealthy());
}
@@ -260,8 +260,8 @@ class TestPolicyComponentsHealthCheckProvider {
}
}
- private DmaapGetTopicResponse createDmaapResponse() {
- DmaapGetTopicResponse response = new DmaapGetTopicResponse();
+ private KafkaGetTopicResponse createKafkaResponse() {
+ KafkaGetTopicResponse response = new KafkaGetTopicResponse();
response.setTopics(List.of("POLICY-PDP-PAP"));
return response;
}
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/e2e/End2EndContext.java b/main/src/test/java/org/onap/policy/pap/main/rest/e2e/End2EndContext.java
index c0c98adc..c6a67483 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/e2e/End2EndContext.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/e2e/End2EndContext.java
@@ -3,7 +3,7 @@
* ONAP PAP
* ================================================================================
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2022-2023 Nordix Foundation.
+ * Modifications Copyright (C) 2022-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -144,7 +144,7 @@ public class End2EndContext {
}
/**
- * Starts the threads that read the "DMaaP" queues..
+ * Starts the threads that read the "kafka" queues.
*/
public void startThreads() {
if (running) {
diff --git a/main/src/test/resources/application-test-e2e.yaml b/main/src/test/resources/application-test-e2e.yaml
index 23920f1d..01f35758 100644
--- a/main/src/test/resources/application-test-e2e.yaml
+++ b/main/src/test/resources/application-test-e2e.yaml
@@ -63,8 +63,8 @@ pap:
password: zb!XztG34
useHttps: true
basePath: healthcheck
- - clientName: dmaap
- hostname: message-router
+ - clientName: kafka
+ hostname: kafka
port: 3905
useHttps: true
basePath: topics
diff --git a/main/src/test/resources/parameters/MinimumParameters.json b/main/src/test/resources/parameters/MinimumParameters.json
index 80125305..bf2f4b54 100644
--- a/main/src/test/resources/parameters/MinimumParameters.json
+++ b/main/src/test/resources/parameters/MinimumParameters.json
@@ -29,13 +29,13 @@
"topicParameterGroup": {
"topicSources" : [{
"topic" : "POLICY-PDP-PAP",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap"
+ "servers" : [ "kafka" ],
+ "topicCommInfrastructure" : "NOOP"
}],
"topicSinks" : [{
"topic" : "POLICY-PDP-PAP",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap"
+ "servers" : [ "kafka" ],
+ "topicCommInfrastructure" : "NOOP"
}]
},
"healthCheckRestClientParameters":[{
diff --git a/main/src/test/resources/parameters/PapConfigParameters.json b/main/src/test/resources/parameters/PapConfigParameters.json
index debdc47c..b7604706 100644
--- a/main/src/test/resources/parameters/PapConfigParameters.json
+++ b/main/src/test/resources/parameters/PapConfigParameters.json
@@ -69,8 +69,8 @@
"basePath": "healthcheck"
},
{
- "clientName": "dmaap",
- "hostname": "message-router",
+ "clientName": "kafka",
+ "hostname": "kafka",
"port": 3905,
"useHttps": true,
"basePath": "topics"
diff --git a/main/src/test/resources/parameters/PapConfigParametersStd.json b/main/src/test/resources/parameters/PapConfigParametersStd.json
index 1b5b0eff..b5ad3304 100644
--- a/main/src/test/resources/parameters/PapConfigParametersStd.json
+++ b/main/src/test/resources/parameters/PapConfigParametersStd.json
@@ -31,14 +31,14 @@
"topicParameterGroup": {
"topicSources" : [{
"topic" : "POLICY-PDP-PAP",
- "servers" : [ "message-router" ],
+ "servers" : [ "kafka" ],
"topicCommInfrastructure" : "noop"
},
{
"topic" : "POLICY-HEARTBEAT",
"effectiveTopic": "POLICY-PDP-PAP",
"consumerGroup": "policy-pap",
- "servers" : [ "message-router" ],
+ "servers" : [ "kafka" ],
"topicCommInfrastructure" : "noop"
}],
"topicSinks" : [{
@@ -70,8 +70,8 @@
"basePath": "healthcheck"
},
{
- "clientName": "dmaap",
- "hostname": "message-router",
+ "clientName": "kafka",
+ "hostname": "kafka",
"port": 3905,
"useHttps": true,
"basePath": "topics"
diff --git a/main/src/test/resources/parameters/PapConfigParameters_Postgres.json b/main/src/test/resources/parameters/PapConfigParameters_Postgres.json
index 46d25b10..5f92936a 100644
--- a/main/src/test/resources/parameters/PapConfigParameters_Postgres.json
+++ b/main/src/test/resources/parameters/PapConfigParameters_Postgres.json
@@ -31,16 +31,16 @@
"topicSources" : [{
"topic" : "POLICY-PDP-PAP",
"servers" : [ "localhost:3904" ],
- "topicCommInfrastructure" : "dmaap"
+ "topicCommInfrastructure" : "NOOP"
}],
"topicSinks" : [{
"topic" : "POLICY-PDP-PAP",
"servers" : [ "localhost:3904" ],
- "topicCommInfrastructure" : "dmaap"
+ "topicCommInfrastructure" : "NOOP"
},{
"topic" : "POLICY-NOTIFICATION",
"servers" : [ "localhost:3904" ],
- "topicCommInfrastructure" : "dmaap"
+ "topicCommInfrastructure" : "NOOP"
}]
},
"healthCheckRestClientParameters":[{