From b6e8ba6a13f362d745d30cee4a898a896e0d3c91 Mon Sep 17 00:00:00 2001 From: Quinn Klassen Date: Fri, 6 Dec 2024 09:54:32 -0800 Subject: [PATCH] Refactor test tracer for consistency --- .../workflow/nexus/CancelAsyncOperationTest.java | 12 ++++++------ .../workflow/nexus/SyncClientOperationTest.java | 4 ++-- .../testing/internal/TracingWorkerInterceptor.java | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/temporal-sdk/src/test/java/io/temporal/workflow/nexus/CancelAsyncOperationTest.java b/temporal-sdk/src/test/java/io/temporal/workflow/nexus/CancelAsyncOperationTest.java index 5c8aad867..ddb418755 100644 --- a/temporal-sdk/src/test/java/io/temporal/workflow/nexus/CancelAsyncOperationTest.java +++ b/temporal-sdk/src/test/java/io/temporal/workflow/nexus/CancelAsyncOperationTest.java @@ -65,9 +65,9 @@ public void asyncOperationImmediatelyCancelled() { .setExpected( "interceptExecuteWorkflow " + SDKTestWorkflowRule.UUID_REGEXP, "newThread workflow-method", - "executeNexusOperation TestNexusService1.operation", - "startNexusOperation TestNexusService1.operation", - "cancelNexusOperation TestNexusService1.operation"); + "executeNexusOperation TestNexusService1 operation", + "startNexusOperation TestNexusService1 operation", + "cancelNexusOperation TestNexusService1 operation"); } @Test @@ -85,13 +85,13 @@ public void asyncOperationCancelled() { .setExpected( "interceptExecuteWorkflow " + SDKTestWorkflowRule.UUID_REGEXP, "newThread workflow-method", - "executeNexusOperation TestNexusService1.operation", - "startNexusOperation TestNexusService1.operation", + "executeNexusOperation TestNexusService1 operation", + "startNexusOperation TestNexusService1 operation", "interceptExecuteWorkflow " + SDKTestWorkflowRule.UUID_REGEXP, "registerSignalHandlers unblock", "newThread workflow-method", "await await", - "cancelNexusOperation TestNexusService1.operation"); + "cancelNexusOperation TestNexusService1 operation"); } public static class TestNexus implements TestWorkflows.TestWorkflow1 { diff --git a/temporal-sdk/src/test/java/io/temporal/workflow/nexus/SyncClientOperationTest.java b/temporal-sdk/src/test/java/io/temporal/workflow/nexus/SyncClientOperationTest.java index a5048f4f1..d774875dd 100644 --- a/temporal-sdk/src/test/java/io/temporal/workflow/nexus/SyncClientOperationTest.java +++ b/temporal-sdk/src/test/java/io/temporal/workflow/nexus/SyncClientOperationTest.java @@ -70,8 +70,8 @@ public void syncClientOperationSuccess() { "interceptExecuteWorkflow " + SDKTestWorkflowRule.UUID_REGEXP, "registerUpdateHandlers update", "newThread workflow-method", - "executeNexusOperation TestNexusService1.operation", - "startNexusOperation TestNexusService1.operation"); + "executeNexusOperation TestNexusService1 operation", + "startNexusOperation TestNexusService1 operation"); // Test metrics all tasks should have Map nexusWorkerTags = ImmutableMap.builder() diff --git a/temporal-testing/src/main/java/io/temporal/testing/internal/TracingWorkerInterceptor.java b/temporal-testing/src/main/java/io/temporal/testing/internal/TracingWorkerInterceptor.java index fb4ec2033..93eb971dd 100644 --- a/temporal-testing/src/main/java/io/temporal/testing/internal/TracingWorkerInterceptor.java +++ b/temporal-testing/src/main/java/io/temporal/testing/internal/TracingWorkerInterceptor.java @@ -197,7 +197,7 @@ public ChildWorkflowOutput executeChildWorkflow(ChildWorkflowInput inp public ExecuteNexusOperationOutput executeNexusOperation( ExecuteNexusOperationInput input) { if (!WorkflowUnsafe.isReplaying()) { - trace.add("executeNexusOperation " + input.getService() + "." + input.getOperation()); + trace.add("executeNexusOperation " + input.getService() + " " + input.getOperation()); } return next.executeNexusOperation(input); } @@ -499,7 +499,7 @@ public StartOperationOutput startOperation(StartOperationInput input) trace.add( "startNexusOperation " + input.getOperationContext().getService() - + "." + + " " + input.getOperationContext().getOperation()); return next.startOperation(input); } @@ -509,7 +509,7 @@ public CancelOperationOutput cancelOperation(CancelOperationInput input) { trace.add( "cancelNexusOperation " + input.getOperationContext().getService() - + "." + + " " + input.getOperationContext().getOperation()); return next.cancelOperation(input); }