< prev index next >
application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/subscription/internal/UpdatePolicyTest.java
Print this page
*** 65,75 ****
helpUpdatePolicyLookup(getNonExistingAttribute());
}
private void helpUpdatePolicyLookup(MRI mri) throws Exception {
IUpdatePolicy policy = UpdatePolicyToolkit.getUpdatePolicy(getConnectionHandle(), mri);
! assertNotNull("Policy is null!", policy); //$NON-NLS-1$
}
@Test
public void testChangeUpdatePolicy() throws Exception {
helpChangeUpdatePolicy(getExistingAttribute());
--- 65,75 ----
helpUpdatePolicyLookup(getNonExistingAttribute());
}
private void helpUpdatePolicyLookup(MRI mri) throws Exception {
IUpdatePolicy policy = UpdatePolicyToolkit.getUpdatePolicy(getConnectionHandle(), mri);
! assertNotNull("Policy is null!", policy);
}
@Test
public void testChangeUpdatePolicy() throws Exception {
helpChangeUpdatePolicy(getExistingAttribute());
*** 168,182 ****
getAttributeSubscriptionService().removeMRIValueListener(this);
}
}
private MRI getExistingAttribute() {
! return new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "UsedPhysicalMemorySize"); //$NON-NLS-1$ //$NON-NLS-2$
}
private MRI getNonExistingAttribute() {
! return new MRI(Type.ATTRIBUTE, "this.could.possible.not:really=exist,as=an", "attribute"); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
public void valueChanged(MRIValueEvent event) {
synchronized (this) {
--- 168,182 ----
getAttributeSubscriptionService().removeMRIValueListener(this);
}
}
private MRI getExistingAttribute() {
! return new MRI(Type.ATTRIBUTE, "java.lang:type=OperatingSystem", "UsedPhysicalMemorySize");
}
private MRI getNonExistingAttribute() {
! return new MRI(Type.ATTRIBUTE, "this.could.possible.not:really=exist,as=an", "attribute");
}
@Override
public void valueChanged(MRIValueEvent event) {
synchronized (this) {
< prev index next >