@Test(timeout = 10000) public void testReconfigFailWithoutSuperuserPasswordConfiguredOnServer() throws InterruptedException { // This tests the case where ZK ensemble does not have the super user's password configured. // Reconfig should fail as the super user has to be explicitly configured via // zookeeper.DigestAuthenticationProvider.superDigest. try { reconfigPort(); Assert.fail(errorMsg); } catch (KeeperException e) { Assert.assertTrue(e.getCode() == KeeperException.Code.NoAuth); } try { zkAdmin.addAuthInfo("digest", "super:".getBytes()); reconfigPort(); Assert.fail(errorMsg); } catch (KeeperException e) { Assert.assertTrue(e.getCode() == KeeperException.Code.NoAuth); } }