File tree Expand file tree Collapse file tree
temporal-sdk/src/test/java/io/temporal/workflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import org .junit .Test ;
2323
2424public class GrpcMessageTooLargeTest {
25- private static final String QUERY_ERROR_MESSAGE =
26- "Failed to send query response: RESOURCE_EXHAUSTED: grpc: received message larger than max" ;
25+ // This string is kept intentionally short to match multiple possible too-large error messages
26+ private static final String TOO_BIG_ERR_MESSAGE = " larger than max" ;
2727 private static final String VERY_LARGE_DATA ;
2828
2929 static {
@@ -120,7 +120,7 @@ public void queryResultTooLarge() {
120120 assertNotNull (e .getCause ());
121121 // The exception will not contain the original failure object, so instead of type check we're
122122 // checking the message to ensure the correct error is being sent.
123- assertTrue (e .getCause ().getMessage ().contains (QUERY_ERROR_MESSAGE ));
123+ assertTrue (e .getCause ().getMessage ().contains (TOO_BIG_ERR_MESSAGE ));
124124 }
125125
126126 @ Test
@@ -132,7 +132,7 @@ public void queryErrorTooLarge() {
132132 WorkflowQueryException e = assertThrows (WorkflowQueryException .class , workflow ::query );
133133
134134 assertNotNull (e .getCause ());
135- assertTrue (e .getCause ().getMessage ().contains (QUERY_ERROR_MESSAGE ));
135+ assertTrue (e .getCause ().getMessage ().contains (TOO_BIG_ERR_MESSAGE ));
136136 }
137137
138138 private static <T > T createWorkflowStub (Class <T > clazz , SDKTestWorkflowRule workflowRule ) {
You can’t perform that action at this time.
0 commit comments