Skip to content

Commit

Permalink
Update error message expectations in 1.15
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Souza <[email protected]>
  • Loading branch information
artursouza committed Jul 28, 2024
1 parent f9ffdeb commit 1feaf65
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public class MethodInvokeIT extends BaseIT {
private static final int TIMEOUT_MS = 100;
private static final ResiliencyOptions RESILIENCY_OPTIONS = new ResiliencyOptions()
.setTimeout(Duration.ofMillis(TIMEOUT_MS));
private static final String EXCEPTION_MARKER = "DEADLINE_EXCEEDED: deadline exceeded after";

/**
* Run of a Dapr application.
Expand Down Expand Up @@ -92,7 +91,7 @@ public void testInvokeTimeout() throws Exception {
String message = assertThrows(StatusRuntimeException.class, () -> stub.sleep(req)).getMessage();
long delay = System.currentTimeMillis() - started;
assertTrue(delay >= TIMEOUT_MS, "Delay: " + delay + " is not greater than timeout: " + TIMEOUT_MS);
assertTrue(message.startsWith(EXCEPTION_MARKER), "Message: " + message + " does not start with: " + EXCEPTION_MARKER);
assertTrue(message.contains("Message: DEADLINE_EXCEEDED: CallOptions deadline exceeded after"));
}
}

Expand All @@ -112,7 +111,8 @@ public void testInvokeException() throws Exception {
// If this test fails, there might be a regression in runtime (like we had in 1.10.0).
// The expectations below are as per 1.9 release and (later on) hotfixed in 1.10.
assertEquals(Status.UNKNOWN.getCode(), exception.getStatus().getCode());
assertEquals("", exception.getStatus().getDescription());
// The error message below is added starting in Dapr 1.15.0
assertEquals("Application error processing RPC", exception.getStatus().getDescription());
}
}

Expand Down

0 comments on commit 1feaf65

Please sign in to comment.