diff --git a/temporal-sdk/src/test/java/io/temporal/workflow/queryTests/DirectQueryReplaysDontSpamLogWithWorkflowExecutionExceptionsTest.java b/temporal-sdk/src/test/java/io/temporal/workflow/queryTests/DirectQueryReplaysDontSpamLogWithWorkflowExecutionExceptionsTest.java index bbdff6ebef..ff4e951f88 100644 --- a/temporal-sdk/src/test/java/io/temporal/workflow/queryTests/DirectQueryReplaysDontSpamLogWithWorkflowExecutionExceptionsTest.java +++ b/temporal-sdk/src/test/java/io/temporal/workflow/queryTests/DirectQueryReplaysDontSpamLogWithWorkflowExecutionExceptionsTest.java @@ -98,10 +98,11 @@ public void queriedWorkflowFailureDoesntProduceAdditionalLogsWhenWorkflowIsNotCo workflow.mySignal("exit"); assertEquals("exit", workflow.execute()); + int executionsBeforeFinalQuery = workflowCodeExecutionCount.get(); assertEquals("my-state", workflow.getState()); assertEquals( - "There was three executions - one original and two full replays for query.", - 3, + "The final query should cause exactly one additional full replay.", + executionsBeforeFinalQuery + 1, workflowCodeExecutionCount.get()); assertEquals( "Only the original exception should be logged.",