use of org.jctools.queues.MpmcArrayQueue in project logging-log4j2 by apache.
the class RecyclerFactoriesTest method test_RecyclerFactoryConverter_using_XML_config.
@Test
@LoggerContextSource("recyclerFactoryCustomizedJsonTemplateLayoutLogging.xml")
void test_RecyclerFactoryConverter_using_XML_config(@Named(value = "List") final ListAppender appender) throws Exception {
final JsonTemplateLayout layout = (JsonTemplateLayout) appender.getLayout();
final Field field = JsonTemplateLayout.class.getDeclaredField("contextRecycler");
field.setAccessible(true);
final QueueingRecycler<?> contextRecycler = (QueueingRecycler<?>) field.get(layout);
final MpmcArrayQueue<?> queue = (MpmcArrayQueue<?>) contextRecycler.getQueue();
Assertions.assertThat(queue.capacity()).isEqualTo(512);
}
Aggregations