ExecutionContextConfiguration execConf = ExecutionContextConfiguration.fromInputStream(
Resources.getResource("test-configuration.properties").openStream());
TestConfiguration conf = TestConfiguration.fromInputStream(
Resources.getResource("test-configuration.properties").openStream(), LOG);
Set<Host> expectedHosts = Sets.newHashSet(new Host("localhost", "hiveptest", new String[]{"/home/hiveptest"}, 2));
ExecutionContext executionContext = execConf.getExecutionContextProvider().createExecutionContext();
Assert.assertEquals(expectedHosts, executionContext.getHosts());
Assert.assertEquals("/tmp/hive-ptest-units/working/dir", execConf.getWorkingDirectory());
Assert.assertEquals("/etc/hiveptest/conf", execConf.getProfileDirectory());
Assert.assertEquals("/tmp/hive-ptest-units/working/dir/logs", execConf.getGlobalLogDirectory());
Assert.assertEquals("/home/brock/.ssh/id_rsa", executionContext.getPrivateKey());
Assert.assertEquals("git://github.com/apache/hive.git", conf.getRepository());
Assert.assertEquals("apache-github", conf.getRepositoryName());
Assert.assertEquals("trunk", conf.getBranch());
Assert.assertEquals("/tmp/hive-ptest-units/working/dir/working", executionContext.getLocalWorkingDirectory());
Assert.assertEquals("-Dtest.continue.on.failure=true -Dtest.silent=false", conf.getAntArgs());
Assert.assertNotNull(conf.toString());
Assert.assertEquals("", conf.getPatch());
conf.setPatch("Patch");