Skip to content

Commit 3ee9a41

Browse files
committed
Disable compression in message-too-large tests
1 parent 55eea5e commit 3ee9a41

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

temporal-sdk/src/test/java/io/temporal/workflow/GrpcMessageTooLargeTest.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import io.temporal.internal.replay.ReplayWorkflowTaskHandler;
1414
import io.temporal.internal.retryer.GrpcMessageTooLargeException;
1515
import io.temporal.internal.worker.PollerOptions;
16+
import io.temporal.serviceclient.GrpcCompression;
17+
import io.temporal.serviceclient.WorkflowServiceStubsOptions;
1618
import io.temporal.testUtils.LoggerUtils;
1719
import io.temporal.testing.internal.SDKTestWorkflowRule;
1820
import io.temporal.workflow.shared.TestActivities;
@@ -24,6 +26,8 @@
2426
public class GrpcMessageTooLargeTest {
2527
private static final String QUERY_ERROR_MESSAGE =
2628
"Failed to send query response: RESOURCE_EXHAUSTED: grpc: received message larger than max";
29+
private static final WorkflowServiceStubsOptions GRPC_COMPRESSION_DISABLED =
30+
WorkflowServiceStubsOptions.newBuilder().setGrpcCompression(GrpcCompression.NONE).build();
2731
private static final String VERY_LARGE_DATA;
2832

2933
static {
@@ -39,21 +43,31 @@ public class GrpcMessageTooLargeTest {
3943
@Rule
4044
public SDKTestWorkflowRule activityStartWorkflowRule =
4145
SDKTestWorkflowRule.newBuilder()
46+
.setWorkflowServiceStubsOptions(GRPC_COMPRESSION_DISABLED)
4247
.setWorkflowTypes(ActivityStartWorkflowImpl.class)
4348
.setActivityImplementations(new TestActivityImpl())
4449
.build();
4550

4651
@Rule
4752
public SDKTestWorkflowRule failureWorkflowRule =
48-
SDKTestWorkflowRule.newBuilder().setWorkflowTypes(FailureWorkflowImpl.class).build();
53+
SDKTestWorkflowRule.newBuilder()
54+
.setWorkflowServiceStubsOptions(GRPC_COMPRESSION_DISABLED)
55+
.setWorkflowTypes(FailureWorkflowImpl.class)
56+
.build();
4957

5058
@Rule
5159
public SDKTestWorkflowRule querySuccessWorkflowRule =
52-
SDKTestWorkflowRule.newBuilder().setWorkflowTypes(QuerySuccessWorkflowImpl.class).build();
60+
SDKTestWorkflowRule.newBuilder()
61+
.setWorkflowServiceStubsOptions(GRPC_COMPRESSION_DISABLED)
62+
.setWorkflowTypes(QuerySuccessWorkflowImpl.class)
63+
.build();
5364

5465
@Rule
5566
public SDKTestWorkflowRule queryFailureWorkflowRule =
56-
SDKTestWorkflowRule.newBuilder().setWorkflowTypes(QueryFailureWorkflowImpl.class).build();
67+
SDKTestWorkflowRule.newBuilder()
68+
.setWorkflowServiceStubsOptions(GRPC_COMPRESSION_DISABLED)
69+
.setWorkflowTypes(QueryFailureWorkflowImpl.class)
70+
.build();
5771

5872
@Test
5973
public void workflowStartTooLarge() {

0 commit comments

Comments
 (0)