javeme commented on code in PR #2278:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2278#discussion_r1354336055


##########
hugegraph-test/src/main/java/org/apache/hugegraph/api/ArthasApiTest.java:
##########
@@ -39,17 +41,24 @@ public void testArthasApi() {
         String body = "{\n" +
                       "  \"action\": \"exec\",\n" +
                       "  \"requestId\": \"req112\",\n" +
-                      "  \"sessionId\": \"\",\n" +
                       "  \"consumerId\": 
\"955dbd1325334a84972b0f3ac19de4f7_2\",\n" +
                       "  \"command\": \"version\",\n" +
                       "  \"execTimeout\": \"10000\"\n" +
                       "}";
-        RestClient arthasApiClient = new RestClient(ARTHAS_API_BASE_URL);
+        RestClient arthasApiClient = new RestClient(ARTHAS_API_BASE_URL,false);

Review Comment:
   expect a space after ","



##########
hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java:
##########
@@ -111,6 +112,17 @@ public RestClient(String url) {
                                                                  PASSWORD));
             this.target = this.client.target(url);
         }
+        public RestClient(String url,Boolean useAuth) {
+            this.client = ClientBuilder.newClient();
+            this.client.register(EncodingFilter.class);
+            this.client.register(GZipEncoder.class);
+            if(useAuth){

Review Comment:
   expect style `if (useAuth) {`



##########
hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java:
##########
@@ -111,6 +112,17 @@ public RestClient(String url) {
                                                                  PASSWORD));
             this.target = this.client.target(url);
         }

Review Comment:
   expect a blank line between 2 methods



##########
hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java:
##########
@@ -111,6 +112,17 @@ public RestClient(String url) {
                                                                  PASSWORD));
             this.target = this.client.target(url);
         }
+        public RestClient(String url,Boolean useAuth) {

Review Comment:
   prefer `boolean enableAuth`



##########
hugegraph-test/src/main/java/org/apache/hugegraph/api/BaseApiTest.java:
##########
@@ -111,6 +112,17 @@ public RestClient(String url) {
                                                                  PASSWORD));
             this.target = this.client.target(url);
         }
+        public RestClient(String url,Boolean useAuth) {

Review Comment:
   let `RestClient(String url)` call `this(url, true)`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to