1313import io .temporal .internal .replay .ReplayWorkflowTaskHandler ;
1414import io .temporal .internal .retryer .GrpcMessageTooLargeException ;
1515import io .temporal .internal .worker .PollerOptions ;
16+ import io .temporal .serviceclient .GrpcCompression ;
17+ import io .temporal .serviceclient .WorkflowServiceStubsOptions ;
1618import io .temporal .testUtils .LoggerUtils ;
1719import io .temporal .testing .internal .SDKTestWorkflowRule ;
1820import io .temporal .workflow .shared .TestActivities ;
2426public 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