From 01c35d496709e8096618c93cb23b92f06a87f2d6 Mon Sep 17 00:00:00 2001 From: Ashutosh Chauhan Date: Tue, 12 Apr 2016 14:20:25 -0700 Subject: [PATCH] HIVE-13495 : Add timeout for individual tests --- ql/src/test/templates/TestCliDriver.vm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ql/src/test/templates/TestCliDriver.vm b/ql/src/test/templates/TestCliDriver.vm index 72cfab9..f29954c 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(150_000); // 150 seconds per test + static { MiniClusterType miniMR = MiniClusterType.valueForString("$clusterMode"); -- 1.7.12.4 (Apple Git-37)