You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/10/11 04:14:27 UTC

[GitHub] [hudi] nsivabalan commented on a change in pull request #2168: [HUDI-1331] Adding support for validating entire dataset and long running tests in test suite framework

nsivabalan commented on a change in pull request #2168:
URL: https://github.com/apache/hudi/pull/2168#discussion_r502862919



##########
File path: hudi-integ-test/src/main/java/org/apache/hudi/integ/testsuite/dag/nodes/DelayNode.java
##########
@@ -0,0 +1,43 @@
+/*
+ * 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.hudi.integ.testsuite.dag.nodes;
+
+import org.apache.hudi.integ.testsuite.dag.ExecutionContext;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Delay Node to add delays between each group of test runs.
+ */
+public class DelayNode extends DagNode<Boolean> {
+
+  private static Logger log = LoggerFactory.getLogger(ValidateDatasetNode.class);
+  private int delayMins;
+
+  public DelayNode(int delayMins) {
+    this.delayMins = delayMins;
+  }
+
+  @Override
+  public void execute(ExecutionContext context) throws Exception {
+    log.warn("Waiting for "+ delayMins+" mins before going for next test run");

Review comment:
       as of now, I have kept it simple with thread.sleep. but open to ideas on how to add delays. Initially I thought we could schedule testsuitejob every time, but haven't thought through completely on whether we need a single test suite job to run and manage delays on its own or can we initiate a test suite job everytime from cron job kind of thing. 




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