// [FABRIC-1172] Jolokia exec operations fail on WildFly
Assume.assumeFalse(getRuntimeType() == RuntimeType.WILDFLY);
ProfileBuilder pbA10 = ProfileBuilder.Factory.create("1.0", "prfA");
pbA10.addConfiguration("pidA", Collections.singletonMap("keyA", "valA"));
ProfileState prfA = getProxy().createProfile(new ProfileState(pbA10.getProfile()));
try {
Assert.assertEquals("prfA", prfA.getId());
Assert.assertEquals("1.0", prfA.getVersion());
Assert.assertTrue(prfA.getAttributes().isEmpty());
Assert.assertEquals("valA", prfA.getConfiguration("pidA").get("keyA"));
// getProfile
Assert.assertEquals(prfA, getProxy().getProfile("1.0", "prfA"));
// updateProfile
prfA = getProxy().getProfile("1.0", "prfA");
pbA10 = ProfileBuilder.Factory.createFrom(prfA.toProfile());
pbA10.addConfiguration("pidB", "keyB", "valB");
prfA = getProxy().updateProfile(new ProfileState(pbA10.getProfile()));
Assert.assertEquals("prfA", prfA.getId());
Assert.assertEquals("1.0", prfA.getVersion());
Assert.assertTrue(prfA.getAttributes().isEmpty());
Assert.assertEquals("valA", prfA.getConfiguration("pidA").get("keyA"));
Assert.assertEquals("valB", prfA.getConfiguration("pidB").get("keyB"));
} finally {
getProxy().deleteProfile("1.0", "prfA", false);
}
}