use of org.apache.logging.log4j.core.util.DummyNanoClock in project logging-log4j2 by apache.
the class PatternParserTest method testNanoPatternShortChangesConfigurationNanoClock.
@Test
public void testNanoPatternShortChangesConfigurationNanoClock() {
final Configuration config = new NullConfiguration();
assertTrue(config.getNanoClock() instanceof DummyNanoClock);
final PatternParser pp = new PatternParser(config, KEY, null);
assertTrue(config.getNanoClock() instanceof DummyNanoClock);
pp.parse("%m");
assertTrue(config.getNanoClock() instanceof DummyNanoClock);
// this changes the config clock
pp.parse("%nano");
assertTrue(config.getNanoClock() instanceof SystemNanoClock);
}
Aggregations