You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pinot.apache.org by GitBox <gi...@apache.org> on 2019/01/25 20:49:04 UTC

[GitHub] npawar commented on a change in pull request #3741: Add integration test for SegmentStatusChecker periodic task

npawar commented on a change in pull request #3741: Add integration test for SegmentStatusChecker periodic task
URL: https://github.com/apache/incubator-pinot/pull/3741#discussion_r251131114
 
 

 ##########
 File path: pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/controller/periodic/tasks/SegmentStatusCheckerIntegrationTest.java
 ##########
 @@ -0,0 +1,259 @@
+/**
+ * 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.pinot.integration.tests.controller.periodic.tasks;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Lists;
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Nullable;
+import org.apache.commons.io.FileUtils;
+import org.apache.helix.model.IdealState;
+import org.apache.pinot.common.data.Schema;
+import org.apache.pinot.common.metrics.ControllerGauge;
+import org.apache.pinot.common.metrics.ControllerMetrics;
+import org.apache.pinot.common.utils.KafkaStarterUtils;
+import org.apache.pinot.common.utils.helix.HelixHelper;
+import org.apache.pinot.common.utils.retry.RetryPolicies;
+import org.apache.pinot.controller.ControllerConf;
+import org.apache.pinot.integration.tests.BaseClusterIntegrationTestSet;
+import org.apache.pinot.integration.tests.ClusterIntegrationTestUtils;
+import org.apache.pinot.util.TestUtils;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+/**
+ * Integration test to check {@link org.apache.pinot.controller.helix.SegmentStatusChecker} is
+ * running and verify the metrics emitted
+ */
+public class SegmentStatusCheckerIntegrationTest extends BaseClusterIntegrationTestSet {
+
+  private String emptyTable = "table1_OFFLINE";
+  private String disabledOfflineTable = "table2_OFFLINE";
+  private String basicOfflineTable = "table3_OFFLINE";
+  private String errorOfflineTable = "table4_OFFLINE";
+  private String realtimeTableErrorState = "table5_REALTIME";
+
+  private static final int SEGMENT_STATUS_CHECKER_INITIAL_DELAY_SECONDS = 60;
 
 Review comment:
   I had started with 40s, but that was not enough time on travis infrastructure to setup the brokers and servers. That was making the tests fail on travis, even though locally they succeeded. Hence bumped it up.
   Locally it takes about 35-40s for setup to be ready. I could try making it 50, but I'm afraid the tests might fail unpredictably

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pinot.apache.org
For additional commands, e-mail: dev-help@pinot.apache.org