alamar commented on a change in pull request #8417:
URL: https://github.com/apache/ignite/pull/8417#discussion_r518842047



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
##########
@@ -3209,6 +3214,13 @@ public void setCounter(int cnt) {
                 this.cnt = cnt;
             }
         }
+
+        /**
+         *
+         * @return whether the startLatch has been counted down, thereby 
indicating that the kernal has full started.

Review comment:
       Does it fit in 120 chars?

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
##########
@@ -1476,6 +1476,11 @@ public static DependencyResolver dependencyResolver() {
         return dependencyResolver.get();
     }
 
+    public static boolean hasKernalStarted(String name) {

Review comment:
       Please add javadoc.

##########
File path: 
modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridProbeCommandTest.java
##########
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.rest.protocols.http.jetty;
+
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.ignite.configuration.ConnectorConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.processors.rest.GridRestCommand;
+import org.apache.ignite.internal.processors.rest.GridRestResponse;
+import 
org.apache.ignite.internal.processors.rest.handlers.GridRestCommandHandler;
+import 
org.apache.ignite.internal.processors.rest.handlers.probe.GridProbeCommandHandler;
+import org.apache.ignite.internal.processors.rest.request.GridRestCacheRequest;
+import org.apache.ignite.plugin.AbstractTestPluginProvider;
+import org.apache.ignite.plugin.PluginProvider;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+
+/**
+ * REST probe cmd test.
+ */
+public class GridProbeCommandTest extends GridCommonAbstractTest {
+

Review comment:
       newline not needed, but javadoc is needed (here and below)

##########
File path: modules/rest-http/pom.xml
##########
@@ -146,6 +146,13 @@
             <scope>test</scope>
         </dependency>
 
+        <dependency>

Review comment:
       Why is it needed now? Maybe move test to ignite-client module?

##########
File path: 
modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridProbeCommandTest.java
##########
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.rest.protocols.http.jetty;
+
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.ignite.configuration.ConnectorConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.processors.rest.GridRestCommand;
+import org.apache.ignite.internal.processors.rest.GridRestResponse;
+import 
org.apache.ignite.internal.processors.rest.handlers.GridRestCommandHandler;
+import 
org.apache.ignite.internal.processors.rest.handlers.probe.GridProbeCommandHandler;
+import org.apache.ignite.internal.processors.rest.request.GridRestCacheRequest;
+import org.apache.ignite.plugin.AbstractTestPluginProvider;
+import org.apache.ignite.plugin.PluginProvider;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+
+/**
+ * REST probe cmd test.
+ */
+public class GridProbeCommandTest extends GridCommonAbstractTest {
+
+    private static final int JETTY_PORT = 8080;
+
+    private CountDownLatch triggerRestCmdLatch = new CountDownLatch(1);
+
+    private CountDownLatch triggerPluginStartLatch = new CountDownLatch(1);
+
+    public static Map<String, Object> executeProbeRestRequest() throws 
IOException {
+

Review comment:
       no newline at start of method

##########
File path: 
modules/rest-http/src/test/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridRestSuite.java
##########
@@ -24,7 +24,8 @@
  */
 @RunWith(Suite.class)
 @Suite.SuiteClasses({
-    RestSetupSimpleTest.class
+    RestSetupSimpleTest.class,

Review comment:
       Do we run this suite anywhere? I guess we don't.
   
   Let's find where the rest of REST tests are (ignite-clients?), move it there.




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

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


Reply via email to