diff --git a/ql/src/test/templates/TestCliDriver.vm b/ql/src/test/templates/TestCliDriver.vm index 72cfab9..afc25be 100644 --- a/ql/src/test/templates/TestCliDriver.vm +++ b/ql/src/test/templates/TestCliDriver.vm @@ -22,7 +22,9 @@ import org.apache.hadoop.hive.ql.QTestUtil.MiniClusterType; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.Timeout; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -32,6 +34,9 @@ public class $className { private static final String HIVE_ROOT = QTestUtil.ensurePathEndsInSlash(System.getProperty("hive.root")); private static QTestUtil qt; + @Rule + public Timeout timeout = new Timeout(300_000); // 300 seconds per test + static { MiniClusterType miniMR = MiniClusterType.valueForString("$clusterMode");