@@ -0,0 +1,2881 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements. See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache license, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License. You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the license for the specific language governing permissions and%0A * limitations under the license.%0A */%0Apackage org.apache.logging.log4j.core.async;%0A%0Aimport org.apache.logging.log4j.LogManager;%0Aimport org.apache.logging.log4j.Logger;%0Aimport org.apache.logging.log4j.categories.AsyncLoggers;%0Aimport org.apache.logging.log4j.core.CoreLoggerContexts;%0Aimport org.apache.logging.log4j.core.config.ConfigurationFactory;%0Aimport org.junit.AfterClass;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Ignore;%0Aimport org.junit.Test;%0Aimport org.junit.experimental.categories.Category;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.File;%0Aimport java.io.FileReader;%0A%0Aimport static org.hamcrest.Matchers.containsString;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.junit.Assert.assertTrue;%0A%0A@Category(AsyncLoggers.class)%0Apublic class AsyncLoggerConfigTest4 %7B%0A%0A    @BeforeClass%0A    public static void beforeClass() %7B%0A        System.setProperty(%22log4j2.is.webapp%22, %22false%22);%0A        System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, %22AsyncLoggerConfigTest4.xml%22);%0A    %7D%0A%0A    @AfterClass%0A    public static void afterClass() %7B%0A        System.clearProperty(%22log4j2.is.webapp%22);%0A    %7D%0A%0A    @Test%0A    @Ignore(%22Ignored until LOG4J2-2301 is resolved%22)%0A    public void testParameters() throws Exception %7B%0A        final File file = new File(%22target%22, %22AsyncLoggerConfigTest4.log%22);%0A        assertTrue(%22Deleted old file before test%22, !file.exists() %7C%7C file.delete());%0A%0A        final Logger log = LogManager.getLogger(%22com.foo.Bar%22);%0A        log.info(%22Additive logging: %7B%7D for the price of %7B%7D!%22, 2, 1);%0A        CoreLoggerContexts.stopLoggerContext(file); // stop async thread%0A%0A        final BufferedReader reader = new BufferedReader(new FileReader(file));%0A        final String line1 = reader.readLine();%0A        final String line2 = reader.readLine();%0A        reader.close();%0A        file.delete();%0A%0A        assertThat(line1, containsString(%22Additive logging: %7B%7D for the price of %7B%7D! %5B2,1%5D Additive logging: 2 for the price of 1!%22));%0A        assertThat(line2, containsString(%22Additive logging: %7B%7D for the price of %7B%7D! %5B2,1%5D Additive logging: 2 for the price of 1!%22));%0A    %7D%0A%7D%0A

Add an ignored failing test for LOG4J2-2301