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 <asouza.pro@gmail.com>
  • Loading branch information
artursouza committed Jul 29, 2024
1 parent f9ffdeb commit 307c95e
Showing 1 changed file with 4 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,8 @@ 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("DEADLINE_EXCEEDED"));
assertTrue(message.contains("CallOptions deadline exceeded after"));
}
}

Expand All @@ -112,7 +112,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 307c95e

Please sign in to comment.