INT-1675: add ignored test

This commit is contained in:
Dave Syer
2010-12-12 12:13:38 +00:00
parent b528abcf68
commit ed63431977

View File

@@ -14,12 +14,17 @@
package org.springframework.integration.jmx.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import javax.management.MBeanOperationInfo;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -51,6 +56,19 @@ public class MBeanRegistrationTests {
assertEquals(1, names.size());
}
@Test
@Ignore // re-instate this if Spring decides to look for @ManagedResource on super classes
public void testServiceActivatorMBeanHasTrackableComponent() throws Exception {
System.err.println(server.queryNames(new ObjectName("test.MBeanRegistration:*"), null));
Set<ObjectName> names = server.queryNames(new ObjectName("test.MBeanRegistration:type=ServiceActivatingHandler,name=service,*"), null);
Map<String,MBeanOperationInfo> infos = new HashMap<String, MBeanOperationInfo>();
for (MBeanOperationInfo info : server.getMBeanInfo(names.iterator().next()).getOperations()) {
infos.put(info.getName(), info);
}
System.err.println(infos);
assertNotNull(infos.get("setShouldTrack"));
}
public static class Source {
public String get() {
return "foo";