From 7a9a1660f076f36ba6c27eafdb6e87322e3484d7 Mon Sep 17 00:00:00 2001 From: CameronRushton Date: Wed, 6 Dec 2023 13:40:09 -0500 Subject: [PATCH] rename correlationId -> commandCorrelationId --- .../com/solace/maas/ep/common/messages/CommandMessage.java | 6 +++--- .../ep/event/management/agent/command/CommandManager.java | 2 +- .../agent/commandManager/CommandManagerTests.java | 4 ++-- .../realTests/NegativeTerraformEVMRConnectedTests.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/service/application/src/main/java/com/solace/maas/ep/common/messages/CommandMessage.java b/service/application/src/main/java/com/solace/maas/ep/common/messages/CommandMessage.java index 262efd78..c01a9a6c 100644 --- a/service/application/src/main/java/com/solace/maas/ep/common/messages/CommandMessage.java +++ b/service/application/src/main/java/com/solace/maas/ep/common/messages/CommandMessage.java @@ -12,7 +12,7 @@ @Data public class CommandMessage extends MOPMessage { - private String correlationId; + private String commandCorrelationId; private String context; private String serviceId; private List commandBundles; @@ -22,7 +22,7 @@ public CommandMessage() { } public CommandMessage(String serviceId, - String correlationId, + String commandCorrelationId, String context, List commandBundles) { super(); @@ -31,7 +31,7 @@ public CommandMessage(String serviceId, .withVersion("1") .withUhFlag(MOPUHFlag.ignore); this.serviceId = serviceId; - this.correlationId = correlationId; + this.commandCorrelationId = commandCorrelationId; this.context = context; this.commandBundles = commandBundles; } diff --git a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/command/CommandManager.java b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/command/CommandManager.java index 54d23999..84a7f3ac 100644 --- a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/command/CommandManager.java +++ b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/command/CommandManager.java @@ -88,7 +88,7 @@ private void sendResponse(CommandMessage request) { Map topicVars = Map.of( "orgId", request.getOrgId(), "runtimeAgentId", eventPortalProperties.getRuntimeAgentId(), - "correlationId", request.getCorrelationId() + "correlationId", request.getCommandCorrelationId() ); commandPublisher.sendCommandResponse(request, topicVars); } diff --git a/service/application/src/test/java/com/solace/maas/ep/event/management/agent/commandManager/CommandManagerTests.java b/service/application/src/test/java/com/solace/maas/ep/event/management/agent/commandManager/CommandManagerTests.java index b03bd596..5abe2989 100644 --- a/service/application/src/test/java/com/solace/maas/ep/event/management/agent/commandManager/CommandManagerTests.java +++ b/service/application/src/test/java/com/solace/maas/ep/event/management/agent/commandManager/CommandManagerTests.java @@ -61,7 +61,7 @@ public void testCommandManager() { message.setActorId("myActorId"); message.setOrgId(eventPortalProperties.getOrganizationId()); message.setTraceId("myTraceId"); - message.setCorrelationId("myCorrelationId"); + message.setCommandCorrelationId("myCorrelationId"); message.setCommandBundles(List.of( CommandBundle.builder() .executionType(ExecutionType.serial) @@ -101,6 +101,6 @@ public void testCommandManager() { Map topicVars = topicArgCaptor.getValue(); assert topicVars.get("orgId").equals(eventPortalProperties.getOrganizationId()); assert topicVars.get("runtimeAgentId").equals(eventPortalProperties.getRuntimeAgentId()); - assert topicVars.get("correlationId").equals(message.getCorrelationId()); + assert topicVars.get("correlationId").equals(message.getCommandCorrelationId()); } } diff --git a/service/application/src/test/java/com/solace/maas/ep/event/management/agent/realTests/NegativeTerraformEVMRConnectedTests.java b/service/application/src/test/java/com/solace/maas/ep/event/management/agent/realTests/NegativeTerraformEVMRConnectedTests.java index 7fab323b..fe0c627b 100644 --- a/service/application/src/test/java/com/solace/maas/ep/event/management/agent/realTests/NegativeTerraformEVMRConnectedTests.java +++ b/service/application/src/test/java/com/solace/maas/ep/event/management/agent/realTests/NegativeTerraformEVMRConnectedTests.java @@ -446,7 +446,7 @@ private void setMessageParams(String serviceId, String correlationId, String con message.setOrgId(eventPortalProperties.getOrganizationId()); message.setTraceId("myTraceId"); message.setServiceId(serviceId); - message.setCorrelationId(correlationId); + message.setCommandCorrelationId(correlationId); }