You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/01/06 22:29:15 UTC

[GitHub] [incubator-gobblin] autumnust commented on a change in pull request #3191: GOBBLIN-1352: Ensure Helix workflows are cleaned up on cluster start up in centralized mode

autumnust commented on a change in pull request #3191:
URL: https://github.com/apache/incubator-gobblin/pull/3191#discussion_r552993956



##########
File path: gobblin-cluster/src/test/java/org/apache/gobblin/cluster/HelixRetriggeringJobCallableTest.java
##########
@@ -0,0 +1,90 @@
+/*
+ * 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.gobblin.cluster;
+
+import java.io.File;
+import java.util.Optional;
+import java.util.Properties;
+
+import org.apache.hadoop.fs.Path;
+import org.apache.helix.HelixManager;
+import org.assertj.core.util.Lists;
+import org.junit.Assert;
+import org.mockito.Mockito;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
+import com.typesafe.config.ConfigValueFactory;
+
+import org.apache.gobblin.configuration.ConfigurationKeys;
+import org.apache.gobblin.runtime.api.MutableJobCatalog;
+import org.apache.gobblin.runtime.job_catalog.NonObservingFSJobCatalog;
+import org.apache.gobblin.scheduler.SchedulerService;
+
+
+public class HelixRetriggeringJobCallableTest {
+  public static final String TMP_DIR = "/tmp/" + HelixRetriggeringJobCallable.class.getSimpleName();
+
+  @BeforeClass
+  public void setUp() {
+    File tmpDir = new File(TMP_DIR);
+    if (!tmpDir.exists()) {
+      tmpDir.mkdirs();
+    }
+    tmpDir.deleteOnExit();
+  }
+
+  @Test
+  public void testBuildJobLauncher()
+      throws Exception {
+    Config config = ConfigFactory.empty().withValue(ConfigurationKeys.JOB_CONFIG_FILE_GENERAL_PATH_KEY,
+        ConfigValueFactory.fromAnyRef(TMP_DIR));
+    MutableJobCatalog jobCatalog = new NonObservingFSJobCatalog(config);
+    SchedulerService schedulerService = new SchedulerService(new Properties());
+    //HelixManager helixManager = Mockito.mock(HelixManager.class);

Review comment:
       Shall we remove these lines ? 




----------------------------------------------------------------
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:
users@infra.apache.org