Skip to content

Commit 1f28fed

Browse files
chore: add more tests
1 parent 9e0e292 commit 1f28fed

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/main/java/com/influxdb/v3/client/internal/GrpcCallOption.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ public String toString() {
166166
+ '}';
167167
}
168168

169+
/**
170+
* Builder for GrpcCallOption
171+
*/
169172
public static final class Builder {
170173
private Deadline deadline;
171174
private Executor executor;

src/main/java/com/influxdb/v3/client/query/QueryOptions.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public Map<String, String> headersSafe() {
148148

149149
/**
150150
* The grpcCallOption pass to this function will be merged with the default grpcCallOption.
151-
* @param: the grpcCallOption
151+
* @param grpcCallOption the grpcCallOption
152152
*/
153153
public void setGrpcCallOption(@Nonnull final GrpcCallOption grpcCallOption) {
154154
GrpcCallOption.Builder builder = getDefaultGrpcCallOptsBuilder(grpcCallOption);
@@ -193,6 +193,9 @@ private static GrpcCallOption.Builder getDefaultGrpcCallOptsBuilder(@Nonnull fin
193193
return builder;
194194
}
195195

196+
/**
197+
* @return grpc call options with some default options
198+
*/
196199
@Nullable
197200
public GrpcCallOption grpcCallOption() {
198201
return grpcCallOption;

src/test/java/com/influxdb/v3/client/query/QueryOptionsTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,13 @@ void setInboundMessageSizeLarge() throws Exception {
180180
}
181181
}
182182

183+
@Test
184+
void grpcCallOptionDefaultOptions() {
185+
GrpcCallOption grpcCallOption = new GrpcCallOption.Builder().build();
186+
Assertions.assertThat(grpcCallOption.getMaxInboundMessageSize())
187+
.isEqualTo(Integer.MAX_VALUE);
188+
}
189+
183190
@Test
184191
void grpcCallOption() {
185192
Executor executor = Executors.newSingleThreadExecutor();

0 commit comments

Comments
 (0)