Skip to content

Commit 2947b91

Browse files
committed
tests: improve test of cloned GrpcCallOptions object.
1 parent 096596a commit 2947b91

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/java/com/influxdb/v3/client/internal/GrpcCallOptionsTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
package com.influxdb.v3.client.internal;
2323

2424

25+
import java.util.concurrent.Executor;
26+
import java.util.concurrent.Executors;
2527
import java.util.concurrent.TimeUnit;
2628

2729
import io.grpc.Deadline;
@@ -117,7 +119,12 @@ void testMergeCallOptionsWithEmptyArrays() {
117119

118120
@Test
119121
void grpcOptionsCloneTest() {
122+
Executor unusedExecutor = Executors.newSingleThreadExecutor();
123+
120124
GrpcCallOptions origOptions = new GrpcCallOptions.Builder()
125+
.withDeadline(Deadline.after(5000, TimeUnit.MILLISECONDS))
126+
.withCompressorName("compressor")
127+
.withExecutor(unusedExecutor)
121128
.withMaxInboundMessageSize(2000)
122129
.withMaxOutboundMessageSize(1000)
123130
.withWaitForReady()

0 commit comments

Comments
 (0)