Re #36: Renamed logging configuration file to not include log4j2 in the name (names will be same across logback and log4j2 test suites).

This commit is contained in:
tomasz.kowalczewski committed 2021-03-12 20:08:31 +01:00
1 parent 4c8c44fe4c
commit be86c9846c
5 files changed
+6 -7

No files matched your search

@@ -57,7 +57,7 @@ public class AllocationTest {
URI uri = getClass()
.getClassLoader()
.getResource("basic-appender-test-log4j2-configuration.xml")
.getResource("basic-appender-test-configuration.xml")
.toURI();
((org.apache.logging.log4j.core.LoggerContext) LogManager.getContext(false))
@@ -23,7 +23,7 @@ class LokiAppenderMonitoringTest {
// Given
URI uri = getClass()
.getClassLoader()
.getResource("basic-appender-test-log4j2-configuration.xml")
.getResource("basic-appender-test-configuration.xml")
.toURI();
LoggerContext context = (LoggerContext) LogManager.getContext(false);
@@ -40,7 +40,7 @@ class LokiAppenderShutdownTest {
URI uri = getClass()
.getClassLoader()
.getResource("basic-appender-test-log4j2-configuration.xml")
.getResource("basic-appender-test-configuration.xml")
.toURI();
((org.apache.logging.log4j.core.LoggerContext) LogManager.getContext(false))
@@ -17,7 +17,6 @@ import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -41,14 +40,14 @@ class LokiAppenderTest {
.withExposedPorts(3100);
@Test
void shouldSendData() throws URISyntaxException {
void shouldSendData() throws Exception {
// Given
System.setProperty("loki.host", loki.getHost());
System.setProperty("loki.port", loki.getFirstMappedPort().toString());
URI uri = getClass()
.getClassLoader()
.getResource("basic-appender-test-log4j2-configuration.xml")
.getResource("basic-appender-test-configuration.xml")
.toURI();
((org.apache.logging.log4j.core.LoggerContext) LogManager.getContext(false))
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="OFF" shutdownHook="disable" packages="pl.tkowalcz.tjahzi.log4j2">
<configuration packages="pl.tkowalcz.tjahzi.log4j2">
<Loggers>
<Root level="INFO">
<AppenderRef ref="Loki"/>