You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by vi...@apache.org on 2018/06/26 05:17:44 UTC
[8/8] hive git commit: Running multiple test batches on one host
using containers
Running multiple test batches on one host using containers
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/a2b2e125
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/a2b2e125
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/a2b2e125
Branch: refs/heads/HIVE-19429
Commit: a2b2e125e547c2fafff0daa001e1de249ebb916d
Parents: 47f76b3
Author: Vihang Karajgaonkar <vi...@cloudera.com>
Authored: Mon Jun 25 22:17:15 2018 -0700
Committer: Vihang Karajgaonkar <vi...@cloudera.com>
Committed: Mon Jun 25 22:17:15 2018 -0700
----------------------------------------------------------------------
.../hive/ptest/execution/ContainerClient.java | 4 +-
.../execution/containers/DockerClient.java | 47 ++++----
.../containers/DockerHostExecutor.java | 34 ++++--
.../ptest2/src/main/resources/copy-test-logs.vm | 14 +--
.../ptest/execution/TestPtestOnDockers.java | 107 +++++++++++++++++--
.../ptest2/src/test/resources/DUMMY-002.patch | 51 +++++++++
6 files changed, 206 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/a2b2e125/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/ContainerClient.java
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/ContainerClient.java b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/ContainerClient.java
index 6d3b112..02fda33 100644
--- a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/ContainerClient.java
+++ b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/ContainerClient.java
@@ -27,9 +27,9 @@ public interface ContainerClient {
void defineImage(String dir) throws Exception;
String getBuildCommand(String dir, long toWait, TimeUnit unit)
throws Exception;
- String getRunContainerCommand(String containerName, final String imageTag, TestBatch testBatch);
+ String getRunContainerCommand(String containerName, TestBatch testBatch);
String getCopyTestLogsCommand(String containerName, String dir);
- String getStopContainerCommand(String containerName);
+ String getStopContainerCommand(String containerName, boolean forceRemove);
}
http://git-wip-us.apache.org/repos/asf/hive/blob/a2b2e125/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerClient.java
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerClient.java b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerClient.java
index 5d107a1..fe1a547 100644
--- a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerClient.java
+++ b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerClient.java
@@ -85,41 +85,46 @@ public class DockerClient implements ContainerClient {
}
@Override
- public String getRunContainerCommand(String containerName, final String imageTag, TestBatch batch) {
- return new StringBuilder("docker run")
- .append(" -t " + imageTag)
+ public String getRunContainerCommand(String containerName, TestBatch batch) {
+ return new StringBuilder("/usr/local/bin/docker run")
+ .append(" --memory " + "2G")
.append(" --name " + containerName)
- .append(" " + imageName())
+ //.append(" -d")
+ .append(" -t " + imageName())
.append(" /bin/bash")
.append(" -c")
- .append("( cd " + batch.getTestModuleRelativeDir() + "; ")
- .append("/usr/bin/mvn")
- .append(" -Dsurefire.timeout=40m")
+ .append(" \"cd " + batch.getTestModuleRelativeDir() + ";")
+ .append(" /usr/bin/mvn")
+ .append(" -Dsurefire.timeout=2400")
.append(" -B test")
.append(" " + batch.getTestArguments())
- .append(" 1>$workingDir/logs" + File.separatorChar + "maven.txt")
- .append(" 2>&1")
+ .append(
+ " 1>" + File.separatorChar + "/tmp" + File.separatorChar + "maven.txt")
+ .append(" 2>&1 ;")
+ .append(
+ " /bin/bash /home/ptestuser/scratch/copy-test-logs.sh 1>" + File.separatorChar + "tmp"
+ + File.separatorChar + "copy-test-logs.txt 2>&1; \"")
.toString();
}
@Override
public String getCopyTestLogsCommand(String containerName, String dir) {
- return new StringBuilder("docker run")
- .append(" --name " + containerName)
- .append(" " + imageName())
- .append(" /bin/bash")
- .append(" -c")
- .append("( cd " + dir + "; ")
- .append("bash")
- .append(" copy-test-logs.sh")
- .append(" 1>$workingDir/logs" + File.separatorChar + "copy-test-logs.txt")
- .append(" 2>&1")
+ String containerLogDir = context.getTemplateDefaults().get("containerLogDir");
+ //TODO get path for docker executable from context
+ return new StringBuilder("/usr/local/bin/docker cp")
+ .append(" " + containerName + ":" + containerLogDir)
+ .append(" " + dir)
.toString();
}
@Override
- public String getStopContainerCommand(String containerName) {
- return new StringBuilder("docker stop " + containerName).toString();
+ public String getStopContainerCommand(String containerName, boolean forceRemove) {
+ //TODO get path for docker executable from context
+ StringBuilder ret = new StringBuilder("/usr/local/bin/docker stop " + containerName);
+ if (forceRemove) {
+ ret.append("; /usr/local/bin/docker rm " + containerName);
+ }
+ return ret.toString();
}
private String imageName() {
http://git-wip-us.apache.org/repos/asf/hive/blob/a2b2e125/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerHostExecutor.java
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerHostExecutor.java b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerHostExecutor.java
index 4aa03d2..51b8fea 100644
--- a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerHostExecutor.java
+++ b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/containers/DockerHostExecutor.java
@@ -141,7 +141,7 @@ public class DockerHostExecutor extends HostExecutor {
throws AbortContainerException, IOException, SSHExecutionException {
final int containerInstanceId = containerNameId.getAndIncrement();
final String containerName = getContainerName(containerInstanceId);
- String runCommand = dockerClient.getRunContainerCommand(containerName, mTemplateDefaults.get("buildTag"), batch);
+ String runCommand = dockerClient.getRunContainerCommand(containerName, batch);
Stopwatch sw = Stopwatch.createStarted();
mLogger.info("Executing " + batch + " with " + runCommand);
RemoteCommandResult sshResult = new SSHCommand(mSSHCommandExecutor, mPrivateKey, mHost.getUser(),
@@ -165,27 +165,33 @@ public class DockerHostExecutor extends HostExecutor {
}
boolean result;
if (sshResult.getExitCode() != 0 || sshResult.getException() != null) {
+ mLogger.debug(sshResult.getOutput());
result = false;
batchLogDir = Dirs.create(new File(mFailedTestLogDir, batch.getName()));
} else {
result = true;
batchLogDir = Dirs.create(new File(mSuccessfulTestLogDir, batch.getName()));
}
- String copyLogsCommand = dockerClient.getCopyTestLogsCommand(containerName,"/home/ptestuser/scratch/");
+ String copyLogsCommand = dockerClient.getCopyTestLogsCommand(containerName, batchLogDir.getAbsolutePath());
sw = Stopwatch.createStarted();
- mLogger.info("Copying logs for the " + batch + " with " + runCommand);
+ mLogger.info("Copying logs for the " + batch + " with " + copyLogsCommand);
sshResult = new SSHCommand(mSSHCommandExecutor, mPrivateKey, mHost.getUser(),
mHost.getName(), containerInstanceId, copyLogsCommand, true).
call();
sw.stop();
- mLogger.info(
- "Completed copying logs for batch [{}] on host {} using container instance {}. ElapsedTime(ms)={}",
- new Object[] { batch.getName(), mHost.toShortString(), containerInstanceId,
- sw.elapsed(TimeUnit.MILLISECONDS) });
+ if (sshResult.getExitCode() != 0 || sshResult.getException() != null) {
+ mLogger.error("Could not copy logs for batch [{}] on host {} using container instance {}. ElapsedTime(ms)={}",
+ new Object[] { batch.getName(), mHost.toShortString(), containerInstanceId,
+ sw.elapsed(TimeUnit.MILLISECONDS) });
+ //TODO do we need to throw error?
+ //throw new AbortContainerException("Could not stop container after test execution");
+ } else {
+ mLogger.info(
+ "Completed copying logs for batch [{}] on host {} using container instance {}. ElapsedTime(ms)={}",
+ new Object[] { batch.getName(), mHost.toShortString(), containerInstanceId,
+ sw.elapsed(TimeUnit.MILLISECONDS) });
+ }
- //Copy log files from the container to Ptest server
- copyFromContainerHostToLocal(containerInstanceId, batchLogDir.getAbsolutePath(),
- mHost.getLocalDirectories()[containerSlotId] + "/", fetchLogsForSuccessfulTests || !result);
File logFile = new File(batchLogDir, String.format("%s.txt", batch.getName()));
PrintWriter writer = new PrintWriter(logFile);
writer.write(String.format("result = '%s'\n", sshResult.toString()));
@@ -194,8 +200,14 @@ public class DockerHostExecutor extends HostExecutor {
sshResult.getException().printStackTrace(writer);
}
writer.close();
+
+ //Copy log files from the container to Ptest server
+ //TODO original code had String[] for localDirectories
+ copyFromContainerHostToLocal(containerInstanceId, batchLogDir.getAbsolutePath(),
+ mHost.getLocalDirectories()[0] + "/", fetchLogsForSuccessfulTests || !result);
+
//TODO add code to shutdown the container and delete it
- String stopContainerCommand = dockerClient.getStopContainerCommand(containerName);
+ String stopContainerCommand = dockerClient.getStopContainerCommand(containerName, true);
sw = Stopwatch.createStarted();
mLogger.info("Stopping container " + containerName + " with " + stopContainerCommand);
sshResult = new SSHCommand(mSSHCommandExecutor, mPrivateKey, mHost.getUser(),
http://git-wip-us.apache.org/repos/asf/hive/blob/a2b2e125/testutils/ptest2/src/main/resources/copy-test-logs.vm
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/main/resources/copy-test-logs.vm b/testutils/ptest2/src/main/resources/copy-test-logs.vm
index d218e90..4cf110d 100644
--- a/testutils/ptest2/src/main/resources/copy-test-logs.vm
+++ b/testutils/ptest2/src/main/resources/copy-test-logs.vm
@@ -22,19 +22,19 @@ ps -e -o pid,pgrp,user,args
ps x -o "%p %r %y %x %c "
date +"%Y-%m-%d %T.%3N"
-mkdir ${logDir}/logs
+mkdir -p ${containerLogDir}
cd /home/ptestuser/hive
find ./ -type f -name 'TEST-*.xml' | \
-xargs -I {} sh -c 'f=TEST-${batchName}-$(basename {}); test -f ${logDir}/$f && f=$f-$(uuidgen); mv {} ${logDir}/$f'
+xargs -I {} sh -c 'f=TEST-${batchName}-$(basename {}); test -f ${containerLogDir}/$f && f=$f-$(uuidgen); mv {} ${containerLogDir}/$f'
find ./ -type f -name hive.log -o -name spark.log -o -name derby.log | \
-xargs -I {} sh -c 'f=$(basename {}); test -f ${logDir}/logs/$f && f=$f-$(uuidgen); mv {} ${logDir}/logs/$f'
+xargs -I {} sh -c 'f=$(basename {}); test -f ${containerLogDir}/logs/$f && f=$f-$(uuidgen); mv {} ${containerLogDir}/logs/$f'
find ./ -path "*/spark/work" | \
-xargs -I {} sh -c 'mv {} ${logDir}/logs/spark-log'
+xargs -I {} sh -c 'mv {} ${containerLogDir}/logs/spark-log'
find ./ -type f -name 'syslog*' | \
-xargs -I {} sh -c 'mkdir -p ${logDir}/logs/syslogs; mv {} ${logDir}/logs/syslogs'
+xargs -I {} sh -c 'mkdir -p ${containerLogDir}/logs/syslogs; mv {} ${containerLogDir}/logs/syslogs'
date +"%Y-%m-%d %T.%3N"
-if [[ -f $logDir/.log ]]
+if [[ -f $containerLogDir/.log ]]
then
-mv $logDir/.log $logDir/logs/dot.log
+mv $containerLogDir/.log $containerLogDir/logs/dot.log
fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hive/blob/a2b2e125/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestPtestOnDockers.java
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestPtestOnDockers.java b/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestPtestOnDockers.java
index c5e82c4..4f9445e 100644
--- a/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestPtestOnDockers.java
+++ b/testutils/ptest2/src/test/java/org/apache/hive/ptest/execution/TestPtestOnDockers.java
@@ -19,12 +19,16 @@
package org.apache.hive.ptest.execution;
+import com.google.common.base.Splitter;
import com.google.common.base.Suppliers;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
import org.apache.hive.ptest.execution.LocalCommand.CollectLogPolicy;
import org.apache.hive.ptest.execution.conf.Host;
import org.apache.hive.ptest.execution.conf.QFileTestBatch;
@@ -36,6 +40,9 @@ import org.apache.hive.ptest.execution.containers.DockerPrepPhase;
import org.apache.hive.ptest.execution.containers.TestDockerPrepPhase;
import org.apache.hive.ptest.execution.context.ExecutionContext;
import org.apache.hive.ptest.execution.ssh.NonZeroExitCodeException;
+import org.apache.hive.ptest.execution.ssh.SSHCommand;
+import org.apache.hive.ptest.execution.ssh.SSHCommandExecutor;
+import org.apache.hive.ptest.execution.ssh.TestSSHCommandExecutor;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -49,7 +56,10 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
+import java.util.Queue;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
@@ -64,6 +74,47 @@ import static org.mockito.Mockito.spy;
public class TestPtestOnDockers {
//TODO add logic to ignore this test if docker is not found on the machine
+ private static class TestSSHCommandExecutor extends SSHCommandExecutor {
+ private final List<String> mCommands;
+ private final Map<String, Queue<Integer>> mFailures;
+ private final AtomicInteger matchCount = new AtomicInteger(0);
+ public TestSSHCommandExecutor(Logger logger) {
+ super(logger);
+ mCommands = Lists.newArrayList();
+ mFailures = Maps.newHashMap();
+ }
+ public synchronized List<String> getCommands() {
+ return mCommands;
+ }
+ public synchronized void putFailure(String command, Integer... exitCodes) {
+ Queue<Integer> queue = mFailures.get(command);
+ if(queue == null) {
+ queue = new LinkedList<Integer>();
+ mFailures.put(command, queue);
+ } else {
+ queue = mFailures.get(command);
+ }
+ for(Integer exitCode : exitCodes) {
+ queue.add(exitCode);
+ }
+ }
+ @Override
+ public synchronized void execute(SSHCommand command) {
+ mCommands.add(command.getCommand());
+ command.setOutput("");
+ Queue<Integer> queue = mFailures.get(command.getCommand());
+ if(queue == null || queue.isEmpty()) {
+ command.setExitCode(0);
+ } else {
+ matchCount.incrementAndGet();
+ command.setExitCode(queue.remove());
+ }
+ }
+
+ public int getMatchCount() {
+ return matchCount.get();
+ }
+ }
private DockerPrepPhase prepPhase;
private DockerExecutionPhase execPhase;
private static File dummyPatchFile;
@@ -85,16 +136,16 @@ public class TestPtestOnDockers {
private Host host;
private static final String LOCAL_DIR = "/some/local/dir";
- private static final String PRIVATE_KEY = "some.private.key";
- private static final String USER = "someuser";
- private static final String HOST = "somehost";
+ private static final String PRIVATE_KEY = "~/.ssh/id_rsa";
+ private static final String USER = "vihang";
+ private static final String HOST = "localhost";
private static final int INSTANCE = 13;
private static final String INSTANCE_NAME = HOST + "-" + USER + "-" + INSTANCE;
private static final String REAL_BRANCH = "master";
private static final String REAL_REPOSITORY = "https://github.com/apache/hive.git";
private static final String REAL_REPOSITORY_NAME = "apache-hive";
private static final String REAL_MAVEN_OPTS = "-Xmx2048m";
- private MockSSHCommandExecutor sshCommandExecutor;
+ private SSHCommandExecutor sshCommandExecutor;
private MockRSyncCommandExecutor rsyncCommandExecutor;
private static final String BUILD_TAG = "docker-ptest-tag";
private final Set<String> executedTests = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
@@ -107,12 +158,13 @@ public class TestPtestOnDockers {
scratchDir = Dirs.create(new File(baseDir, "scratch"));
succeededLogDir = Dirs.create(new File(logDir, "succeeded"));
failedLogDir = Dirs.create(new File(logDir, "failed"));
- executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(2));
+ executor = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool(
+ new ThreadFactoryBuilder().setDaemon(true).setNameFormat("DockerHostExecutor %d").build()));
executionContext = mock(ExecutionContext.class);
hostExecutorBuilder = mock(HostExecutorBuilder.class);
//use real localCommandFactory
localCommandFactory = new LocalCommandFactory(logger);
- sshCommandExecutor = spy(new MockSSHCommandExecutor(logger));
+ sshCommandExecutor = new SSHCommandExecutor(logger);
rsyncCommandExecutor = spy(new MockRSyncCommandExecutor(logger));
templateDefaults = ImmutableMap.<String, String>builder()
.put("localDir", LOCAL_DIR)
@@ -125,13 +177,14 @@ public class TestPtestOnDockers {
.put("repository", REAL_REPOSITORY)
.put("repositoryName", REAL_REPOSITORY_NAME)
.put("mavenEnvOpts", REAL_MAVEN_OPTS)
+ .put("containerLogDir", "/tmp/testlogs")
.build();
host = new Host(HOST, USER, new String[] { LOCAL_DIR }, 2);
}
@BeforeClass
public static void beforeClass() throws Exception {
- URL url = TestPtestOnDockers.class.getResource("/DUMMY-001.patch");
+ URL url = TestPtestOnDockers.class.getResource("/DUMMY-002.patch");
dummyPatchFile = new File(url.getFile());
Assert.assertTrue("Could not find dummy patch file " + dummyPatchFile.getAbsolutePath(),
dummyPatchFile.exists());
@@ -153,9 +206,43 @@ public class TestPtestOnDockers {
private void createTestBatches() throws Exception {
testBatches = new ArrayList<>();
- TestBatch qfileTestBatch = new QFileTestBatch(new AtomicInteger(1), "", "TestCliDriver", "",
- Sets.newHashSet("insert0.q"), true, "itests/qtest");
+ AtomicInteger batchIdCounter = new AtomicInteger(1);
+ TestBatch qfileTestBatch = new QFileTestBatch(batchIdCounter, "test", "TestCliDriver", "qfile",
+ Sets.newHashSet(Splitter.on(", ").split(
+ "ppd_join3.q, auto_join23.q, list_bucket_dml_11.q, join10.q, udf_lower.q, "
+ + "avro_type_evolution.q, constprog_dp.q, create_struct_table.q, "
+ + "skewjoin_mapjoin9.q, check_constraint.q, hook_context_cs.q, "
+ + "vector_parquet_nested_two_level_complex.q, exim_22_import_exist_authsuccess.q,"
+ + "groupby1.q, create_func1.q, cbo_rp_udf_udaf.q, vector_decimal_aggregate.q,"
+ + "create_skewed_table1.q, partition_wise_fileformat.q, union_ppr.q,"
+ + "spark_combine_equivalent_work.q, stats_partial_size.q, join32.q,"
+ + "list_bucket_dml_14.q, input34.q, udf_parse_url.q, "
+ + "schema_evol_text_nonvec_part.q, enforce_constraint_notnull.q, "
+ + "zero_rows_single_insert.q, ctas_char.q")),
+ true, "itests/qtest");
+
+ /*TestBatch unitTestBatch = new UnitTestBatch(new AtomicInteger(1), "test", Lists.newArrayList(
+ Splitter.on(", ").split("TestCommands, TestUserHS2ConnectionFileParser, TestBufferedRows, "
+ + "TestBeeLineOpts, TestHiveCli, TestClientCommandHookFactory, "
+ + "TestBeeLineExceptionHandling, TestBeelineArgParsing, TestIncrementalRows, "
+ + "TestShutdownHook, TestBeeLineHistory, TestHiveSchemaTool, TestTableOutputFormat")),
+ "beeline", true);*/
+ TestBatch unitTestBatch = new UnitTestBatch(batchIdCounter, "test", Lists.newArrayList(
+ Splitter.on(", ").split("TestCommands, TestUserHS2ConnectionFileParser, TestBufferedRows, "
+ + "TestBeeLineOpts")),
+ "beeline", true);
+
+ TestBatch failingQueryTestBatch =
+ new QFileTestBatch(batchIdCounter, "test", "TestCliDriver", "qfile",
+ Sets.newHashSet(Splitter.on(", ").split("dummy_failing_test.q")), true, "itests/qtest");
+
+ TestBatch failingUnitTestBatch =
+ new UnitTestBatch(batchIdCounter, "test", Lists.newArrayList("TestFakeFailure"), "service",
+ true);
testBatches.add(qfileTestBatch);
+ testBatches.add(unitTestBatch);
+ testBatches.add(failingQueryTestBatch);
+ testBatches.add(failingUnitTestBatch);
}
private void createHostExecutor() throws Exception {
@@ -176,7 +263,7 @@ public class TestPtestOnDockers {
* @throws Exception
*/
@Test
- public void testDockerFile() throws Throwable {
+ public void testPrepPhase() throws Throwable {
prepPhase.execute();
Assert.assertNotNull("Scratch directory needs to be set", prepPhase.getLocalScratchDir());
File dockerFile = new File(prepPhase.getLocalScratchDir(), "Dockerfile");
http://git-wip-us.apache.org/repos/asf/hive/blob/a2b2e125/testutils/ptest2/src/test/resources/DUMMY-002.patch
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/test/resources/DUMMY-002.patch b/testutils/ptest2/src/test/resources/DUMMY-002.patch
new file mode 100644
index 0000000..4bba56c
--- /dev/null
+++ b/testutils/ptest2/src/test/resources/DUMMY-002.patch
@@ -0,0 +1,51 @@
+commit 47f76b3dac1b21d106051ab145f85932a3e0aa78
+Author: Vihang Karajgaonkar <vi...@cloudera.com>
+Date: Mon Jun 25 17:27:55 2018 -0700
+
+ fake tests
+
+diff --git a/ql/src/test/queries/clientpositive/dummy_failing_test.q b/ql/src/test/queries/clientpositive/dummy_failing_test.q
+new file mode 100644
+index 0000000000000000000000000000000000000000..8d5b53aacb6fc1339164104f0123cbaabc4a06e0
+--- /dev/null
++++ b/ql/src/test/queries/clientpositive/dummy_failing_test.q
+@@ -0,0 +1,2 @@
++-! qt:dataset:src
++select * from table_not_exists limit 1;
+diff --git a/service/src/test/org/apache/hive/service/TestFakeFailure.java b/service/src/test/org/apache/hive/service/TestFakeFailure.java
+new file mode 100644
+index 0000000000000000000000000000000000000000..7b5a7ba9cd680a31dbb60adb7823e032881c5120
+--- /dev/null
++++ b/service/src/test/org/apache/hive/service/TestFakeFailure.java
+@@ -0,0 +1,31 @@
++/*
++ *
++ * 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.hive.service;
++
++import org.junit.Assert;
++import org.junit.Test;
++
++public class TestFakeFailure {
++ @Test
++ public void fakeTest() {
++ Assert.assertTrue("Something gotta be seriously wrong if this test didn't work",
++ 1 == 2);
++ }
++}