@Test
public void testWrongSecret() throws Exception {
setSecret("secret");
try {
ShutdownRuntimeMXBean runtime = JMX.newMXBeanProxy(platformMBeanServer, runtimeON, ShutdownRuntimeMXBean.class);
runtime.shutdown("foo", 60000L, null);
fail();
} catch (final IllegalArgumentException e) {
assertEquals("Invalid secret", e.getMessage());
}
}
ShutdownTest.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:hashsdn-controller
作者:
评论列表
文章目录