HADOOP-15280. TestKMS.testWebHDFSProxyUserKerb and TestKMS.testWebHDFSProxyUserSimple fail in trunk. Contributed by Bharat Viswanadham.

This commit is contained in:
Xiao Chen 2018-03-08 10:16:37 -08:00
parent 0c2b969e01
commit a906a22645

View File

@ -2667,7 +2667,11 @@ public Void run() throws Exception {
kp.createKey("kbb", new KeyProvider.Options(conf));
Assert.fail();
} catch (Exception ex) {
Assert.assertTrue(ex.getMessage(), ex.getMessage().contains("Forbidden"));
GenericTestUtils.assertExceptionContains("Error while " +
"authenticating with endpoint", ex);
GenericTestUtils.assertExceptionContains("Forbidden", ex
.getCause().getCause());
}
return null;
}