File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed
main/java/com/influxdb/v3/client/internal
test/java/com/influxdb/v3/client/integration Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -260,24 +260,24 @@ public FullHttpResponse request(@Nonnull HttpMethod method,
260260 }
261261
262262
263- // if (this.channel == null || !this.channel.isOpen()) {
264- // ChannelFuture channelFuture = getBootstrap().connect();
265- // if (!channelFuture.await(this.timeout.toMillis(), TimeUnit.MILLISECONDS)) {
266- // throw new InfluxDBApiException(new ConnectTimeoutException());
267- // }
268- // this.channel = channelFuture.channel();
269- //
270- // //fixme remove syncUninterruptibly
271- // this.channel.writeAndFlush(request).sync();
272- // }
273-
274- //fixme refactor
275263 if (this .channel == null || !this .channel .isOpen ()) {
276- this .channel = getBootstrap ().connect ().syncUninterruptibly ().channel ();
277- }
264+ ChannelFuture channelFuture = getBootstrap ().connect ();
265+ if (!channelFuture .await (this .timeout .toMillis (), TimeUnit .MILLISECONDS )) {
266+ throw new InfluxDBApiException (new ConnectTimeoutException ());
267+ }
268+ this .channel = channelFuture .channel ();
278269
270+ }
279271 //fixme remove syncUninterruptibly
280- this .channel .writeAndFlush (request ).syncUninterruptibly ();
272+ this .channel .writeAndFlush (request ).sync ();
273+
274+ //fixme refactor
275+ // if (this.channel == null || !this.channel.isOpen()) {
276+ // this.channel = getBootstrap().connect().syncUninterruptibly().channel();
277+ // }
278+ //
279+ // //fixme remove syncUninterruptibly
280+ // this.channel.writeAndFlush(request).syncUninterruptibly();
281281
282282 fullHttpResponse = this .clientHandler .getResponseFuture ().get ();
283283
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ public void testQueryRows() throws Exception {
233233
234234 //fixme Sleep 1s to make sure all data have completely written
235235 //fixme check if this because netty still running as NIO
236- Thread .sleep (1000 );
236+ // Thread.sleep(1000);
237237
238238 Map <String , Object > parameters = Map .of ("testId" , uuid );
239239 // Result set much be ordered by time
@@ -316,7 +316,7 @@ public void testQueryRowWithOptions() throws Exception {
316316
317317 //fixme Sleep 1s to make sure all data have completely written
318318 //fixme check if this because netty still running as NIO
319- Thread .sleep (1000 );
319+ // Thread.sleep(1000);
320320
321321 // Result set much be ordered by time
322322 String sql = String .format ("Select * from %s where \" testId\" ='%s' order by time" , measurement , uuid );
You can’t perform that action at this time.
0 commit comments