public static NodeFencer create(Configuration conf, String confKey) throws BadFencingConfigurationException { String confStr = conf.get(confKey); if (confStr == null) { return null; } return new NodeFencer(conf, confStr); }
public static NodeFencer create(Configuration conf, String confKey) throws BadFencingConfigurationException { String confStr = conf.get(confKey); if (confStr == null) { return null; } return new NodeFencer(conf, confStr); }
public static NodeFencer create(Configuration conf, String confKey) throws BadFencingConfigurationException { String confStr = conf.get(confKey); if (confStr == null) { return null; } return new NodeFencer(conf, confStr); }
public static NodeFencer create(Configuration conf, String confKey) throws BadFencingConfigurationException { String confStr = conf.get(confKey); if (confStr == null) { return null; } return new NodeFencer(conf, confStr); }
public static NodeFencer create(Configuration conf, String confKey) throws BadFencingConfigurationException { String confStr = conf.get(confKey); if (confStr == null) { return null; } return new NodeFencer(conf, confStr); }
public static NodeFencer setupFencer(String confStr) throws BadFencingConfigurationException { System.err.println("Testing configuration:\n" + confStr); Configuration conf = new Configuration(); return new NodeFencer(conf, confStr); }
public static NodeFencer setupFencer(String confStr) throws BadFencingConfigurationException { System.err.println("Testing configuration:\n" + confStr); Configuration conf = new Configuration(); return new NodeFencer(conf, confStr); }
@Test public void testCheckNoArgs() { try { Configuration conf = new Configuration(); new NodeFencer(conf, "shell"); fail("Didn't throw when passing no args to shell"); } catch (BadFencingConfigurationException confe) { assertTrue( "Unexpected exception:" + StringUtils.stringifyException(confe), confe.getMessage().contains("No argument passed")); } }
@Test public void testCheckNoArgs() { try { Configuration conf = new Configuration(); new NodeFencer(conf, "shell"); fail("Didn't throw when passing no args to shell"); } catch (BadFencingConfigurationException confe) { assertTrue( "Unexpected exception:" + StringUtils.stringifyException(confe), confe.getMessage().contains("No argument passed")); } }
@Test public void testCheckParensNoArgs() { try { Configuration conf = new Configuration(); new NodeFencer(conf, "shell()"); fail("Didn't throw when passing no args to shell"); } catch (BadFencingConfigurationException confe) { assertTrue( "Unexpected exception:" + StringUtils.stringifyException(confe), confe.getMessage().contains("Unable to parse line: 'shell()'")); } }
@Test public void testCheckParensNoArgs() { try { Configuration conf = new Configuration(); new NodeFencer(conf, "shell()"); fail("Didn't throw when passing no args to shell"); } catch (BadFencingConfigurationException confe) { assertTrue( "Unexpected exception:" + StringUtils.stringifyException(confe), confe.getMessage().contains("Unable to parse line: 'shell()'")); } }