@After @Override public void tearDown() throws Exception { super.tearDown(); }
@Test @Override public void testAll() { super.testAll(); }
@Override protected String expandCommand(final String cmd) { String expCmd = cmd; expCmd = expCmd.replaceAll("NAMENODE", namenode); expCmd = super.expandCommand(cmd); return expCmd; }
@Before @Override public void setUp() throws Exception { super.setUp(); }
for (TestCmd cmd : testCommands) { try { cmdResult = execute(cmd); } catch (Exception e) { fail(StringUtils.stringifyException(e)); compareOutput = compareTestOutput(cd, cmdResult); overallTCResult &= compareOutput; for (TestCmd cmd : cleanupCommands) { try { execute(cmd); } catch (Exception e) { fail(StringUtils.stringifyException(e));
/** * Read the test config file - testConfig.xml */ protected void readTestConfigFile() { String testConfigFile = getTestFile(); if (testsFromConfigFile == null) { boolean success = false; testConfigFile = TEST_CACHE_DATA_DIR + File.separator + testConfigFile; try { SAXParser p = (SAXParserFactory.newInstance()).newSAXParser(); p.parse(testConfigFile, getConfigParser()); success = true; } catch (Exception e) { LOG.info("File: " + testConfigFile + " not found"); success = false; } assertTrue("Error reading test config file", success); } }
/** * Tear down */ public void tearDown() throws Exception { displayResults(); }
public void setUp() throws Exception { // Read the testConfig.xml file readTestConfigFile(); conf = new Configuration(); conf.setBoolean(CommonConfigurationKeys.HADOOP_SECURITY_AUTHORIZATION, true); clitestDataDir = new File(TEST_CACHE_DATA_DIR). toURI().toString().replace(' ', '+'); // Many of the tests expect a replication value of 1 in the output conf.setInt("dfs.replication", 1); }
/** * Read the test config file - testConfig.xml */ protected void readTestConfigFile() { String testConfigFile = getTestFile(); if (testsFromConfigFile == null) { boolean success = false; String configFile = System.getProperty("test.cli.config"); if (configFile == null) { testConfigFile = TEST_CACHE_DATA_DIR + File.separator + testConfigFile; } else { testConfigFile = configFile; } try { SAXParser p = (SAXParserFactory.newInstance()).newSAXParser(); p.parse(testConfigFile, new TestConfigFileParser()); LOG.info("Using test config file " + testConfigFile); success = true; } catch (Exception e) { LOG.info("File: " + testConfigFile + " not found"); success = false; } assertTrue("Error reading test config file", success); } }
@Before @Override public void setUp() throws Exception { super.setUp(); }
for (CLICommand cmd : testCommands) { try { cmdResult = execute(cmd); } catch (Exception e) { fail(StringUtils.stringifyException(e)); compareOutput = compareTestOutput(cd, cmdResult); overallTCResult &= compareOutput; for (CLICommand cmd : cleanupCommands) { try { execute(cmd); } catch (Exception e) { fail(StringUtils.stringifyException(e));
/** * Read the test config file - testConfig.xml */ protected void readTestConfigFile() { String testConfigFile = getTestFile(); if (testsFromConfigFile == null) { boolean success = false; testConfigFile = TEST_CACHE_DATA_DIR + File.separator + testConfigFile; try { SAXParser p = (SAXParserFactory.newInstance()).newSAXParser(); p.parse(testConfigFile, getConfigParser()); success = true; } catch (Exception e) { LOG.info("File: " + testConfigFile + " not found"); success = false; } assertTrue("Error reading test config file", success); } }
/** * Tear down */ public void tearDown() throws Exception { displayResults(); }
public void setUp() throws Exception { // Read the testConfig.xml file readTestConfigFile(); conf = new Configuration(); conf.setBoolean(CommonConfigurationKeys.HADOOP_SECURITY_AUTHORIZATION, true); clitestDataDir = new File(TEST_CACHE_DATA_DIR). toURI().toString().replace(' ', '+'); }
@After @Override public void tearDown() throws Exception { super.tearDown(); String removeTestcliDirCmd = "hadoop fs -rm -r " + TEST_DIR_ABSOLUTE; shHDFS.exec(removeTestcliDirCmd); }
@Test @Override public void testAll() { super.testAll(); }
/** * Expand commands from the test config file. * This method is used in displayResults() and compareTestOutput() only, * so it doesn't have any effect on the test execution itself. * * @param cmd * @return String expanded command */ @Override protected String expandCommand(final String cmd) { String expCmd = super.expandCommand(cmd); // note: super.expandCommand() expands CLITEST_DATA and USERNAME expCmd = expCmd.replaceAll("NAMENODETEST_DIR_ABSOLUTE", NAMENODE_TESTDIR_HACK); expCmd = expCmd.replaceAll("TEST_DIR_ABSOLUTE", TEST_DIR_ABSOLUTE); expCmd = expCmd.replaceAll("supergroup", supergroup); expCmd = expCmd.replaceAll("NAMENODE", namenode); expCmd = expCmd.replaceAll("USER_NAME", username); expCmd = expCmd.replaceAll("HCFS_SCHEME", HCFS_SCHEME); expCmd = expCmd.replaceAll("HCFS_DIRSIZE", HCFS_DIRSIZE); expCmd = expCmd.replaceAll("HCFS_NNMATCH", HCFS_NNMATCH); return expCmd; }
@Before @Override public void setUp() throws Exception { super.setUp(); }
for (CLICommand cmd : testCommands) { try { cmdResult = execute(cmd); } catch (Exception e) { fail(StringUtils.stringifyException(e)); compareOutput = compareTestOutput(cd, cmdResult); overallTCResult &= compareOutput; for (CLICommand cmd : cleanupCommands) { try { execute(cmd); } catch (Exception e) { fail(StringUtils.stringifyException(e));
/** * Tear down */ public void tearDown() throws Exception { displayResults(); }