assertEquals(ProfileLevel.MAX, cons1.getProfileLevel());
}
@Test
public void testConsumerSetCollectorLevel() throws Exception {
ProfileCollector collector = getCollector(serverNode);
ProfileConsumer cons1 = collector.getConsumer("c1");
ProfileLevel cons1Level = cons1.getProfileLevel();
assertEquals(profileCollector.getDefaultProfileLevel(), cons1Level);
// Change default level from what the kernel set, make sure it
// affects later consumers.
profileCollector.setDefaultProfileLevel(ProfileLevel.MIN);
ProfileConsumer cons2 = collector.getConsumer("c2");
assertEquals(profileCollector.getDefaultProfileLevel(),
cons2.getProfileLevel());
// and make sure other consumers aren't affected
assertEquals(cons1Level, cons1.getProfileLevel());
}