ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] alex-plekhanov commented on a change in pull request #6622: IGNITE-11926: GridJobProcessor metrics migration.
Date Tue, 25 Jun 2019 16:32:39 GMT
alex-plekhanov commented on a change in pull request #6622: IGNITE-11926: GridJobProcessor
metrics migration.
URL: https://github.com/apache/ignite/pull/6622#discussion_r297270160

 File path: modules/core/src/test/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsSelfTest.java
 @@ -0,0 +1,358 @@
+ * 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.jobmetrics;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.compute.ComputeJob;
+import org.apache.ignite.compute.ComputeJobResult;
+import org.apache.ignite.compute.ComputeTaskAdapter;
+import org.apache.ignite.compute.ComputeTaskFuture;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.processors.job.GridJobProcessor;
+import org.apache.ignite.spi.IgniteSpiAdapter;
+import org.apache.ignite.spi.IgniteSpiException;
+import org.apache.ignite.spi.IgniteSpiMultipleInstancesSupport;
+import org.apache.ignite.spi.collision.CollisionContext;
+import org.apache.ignite.spi.collision.CollisionExternalListener;
+import org.apache.ignite.spi.collision.CollisionJobContext;
+import org.apache.ignite.spi.collision.CollisionSpi;
+import org.apache.ignite.spi.metric.LongMetric;
+import org.apache.ignite.spi.metric.ReadOnlyMetricRegistry;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import static org.apache.ignite.internal.processors.job.GridJobProcessor.ACTIVE;
+import static org.apache.ignite.internal.processors.job.GridJobProcessor.CANCELED;
+import static org.apache.ignite.internal.processors.job.GridJobProcessor.EXECUTION_TIME;
+import static org.apache.ignite.internal.processors.job.GridJobProcessor.FINISHED;
+import static org.apache.ignite.internal.processors.job.GridJobProcessor.JOBS;
+import static org.apache.ignite.internal.processors.job.GridJobProcessor.REJECTED;
+import static org.apache.ignite.internal.processors.job.GridJobProcessor.STARTED;
+import static org.apache.ignite.internal.processors.job.GridJobProcessor.WAITING;
+import static org.apache.ignite.internal.processors.job.GridJobProcessor.WAITING_TIME;
+import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
+ * Grid job metrics processor load test.
+ */
+public class GridJobMetricsSelfTest extends GridCommonAbstractTest {
+    /** */
+    public static final long TIMEOUT = 10_000;
+    /** */
+    private static CountDownLatch latch;
+    /** Test correct calculation of rejected and waiting metrics of the {@link GridJobProcessor}.
+    @Test
+    public void testGridJobWaitingRejectedMetrics() throws Exception {
+        latch = new CountDownLatch(1);
+        GridTestCollision collisioinSpi = new GridTestCollision();
+        IgniteConfiguration cfg = new IgniteConfiguration()
 Review comment:
   Use `getConfiguration()` method, which uses shared VM IP finder. `new IgniteConfiguration()`
can affect other nodes, located on other machines.

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:

With regards,
Apache Git Services

View raw message