Skip to content

Commit 12cd22b

Browse files
Fix some unit tests
1 parent ba457ad commit 12cd22b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

temporal-sdk/src/test/java/io/temporal/workflow/nexus/OperationFailureConversionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void nexusOperationApplicationFailureNonRetryableFailureConversion() {
4040
Assert.assertTrue(nexusFailure.getCause() instanceof HandlerException);
4141
HandlerException handlerException = (HandlerException) nexusFailure.getCause();
4242
Assert.assertTrue(handlerException.getMessage().contains("failed to call operation"));
43-
Assert.assertEquals(HandlerException.ErrorType.BAD_REQUEST, handlerException.getErrorType());
43+
Assert.assertEquals(HandlerException.ErrorType.INTERNAL, handlerException.getErrorType());
4444
}
4545

4646
@Test
@@ -55,7 +55,7 @@ public void nexusOperationApplicationFailureFailureConversion() {
5555
Assert.assertTrue(nexusFailure.getCause() instanceof HandlerException);
5656
HandlerException handlerFailure = (HandlerException) nexusFailure.getCause();
5757
Assert.assertTrue(handlerFailure.getMessage().contains("exceeded invocation count"));
58-
Assert.assertEquals(HandlerException.ErrorType.BAD_REQUEST, handlerFailure.getErrorType());
58+
Assert.assertEquals(HandlerException.ErrorType.INTERNAL, handlerFailure.getErrorType());
5959
}
6060

6161
public static class TestNexus implements TestWorkflow1 {

temporal-sdk/src/test/java/io/temporal/workflow/nexus/SyncClientOperationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void syncClientOperationFail() {
9696
Map<String, String> execFailedTags =
9797
ImmutableMap.<String, String>builder()
9898
.putAll(operationTags)
99-
.put(MetricsTag.TASK_FAILURE_TYPE, "handler_error_BAD_REQUEST")
99+
.put(MetricsTag.TASK_FAILURE_TYPE, "handler_error_INTERNAL")
100100
.buildKeepingLast();
101101
reporter.assertCounter(MetricsType.NEXUS_EXEC_FAILED_COUNTER, execFailedTags, 1);
102102
}

0 commit comments

Comments
 (0)