@@ -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