Skip to content

Commit 681ae23

Browse files
wip
1 parent 98f63ad commit 681ae23

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/test/java/com/influxdb/v3/client/ITQueryWrite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public void queryTimeoutSuperceededByGrpcOptTest() throws URISyntaxException, SS
425425

426426
QueryOptions queryOptions = QueryOptions.defaultQueryOptions();
427427
queryOptions.setGrpcCallOptions(new GrpcCallOptions.Builder()
428-
.withDeadline(Deadline.after(3000, TimeUnit.SECONDS))
428+
.withDeadline(Deadline.after(900, TimeUnit.MILLISECONDS))
429429
.build()
430430
);
431431

src/test/java/com/influxdb/v3/client/integration/E2ETest.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ void testQueryWithProxy() throws URISyntaxException, SSLException {
8989
NettyHttpClientConfig nettyHttpClientConfig = new NettyHttpClientConfig();
9090

9191
// Set proxy for write api
92-
Supplier<HttpProxyHandler> writeApiProxy = () -> new HttpProxyHandler(new InetSocketAddress("localhost", 10000));
92+
Supplier<HttpProxyHandler> writeApiProxy = () ->
93+
new HttpProxyHandler(new InetSocketAddress("localhost", 10000), username, password);
9394
nettyHttpClientConfig.configureChannelProxy(writeApiProxy);
9495

9596
// Set proxy for query api
@@ -251,16 +252,11 @@ public void testQueryRows() throws Exception {
251252
testDatas.add(map);
252253
}
253254

254-
//fixme Sleep 1s to make sure all data have completely written
255-
//fixme check if this because netty still running as NIO
256-
// Thread.sleep(1000);
257-
258255
Map<String, Object> parameters = Map.of("testId", uuid);
259256
// Result set much be ordered by time
260257
String sql = String.format("Select * from %s where \"testId\"=$testId order by time", measurement);
261258
try (Stream<Map<String, Object>> stream = client.queryRows(sql, parameters)) {
262259
List<Map<String, Object>> results = stream.collect(Collectors.toList());
263-
System.out.println("Result Size: " + results.size());
264260
for (int i = 0; i <= 9; i++) {
265261
Map<String, Object> row = results.get(i);
266262
Map<String, Object> testData = testDatas.get(i);
@@ -334,10 +330,6 @@ public void testQueryRowWithOptions() throws Exception {
334330
testDatas.add(map);
335331
}
336332

337-
//fixme Sleep 1s to make sure all data have completely written
338-
//fixme check if this because netty still running as NIO
339-
// Thread.sleep(1000);
340-
341333
// Result set much be ordered by time
342334
String sql = String.format("Select * from %s where \"testId\"='%s' order by time", measurement, uuid);
343335
try (Stream<Map<String, Object>> stream = client.queryRows(sql, QueryOptions.defaultQueryOptions())) {

0 commit comments

Comments
 (0)