This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
The following commit(s) were added to refs/heads/main by this push:
new 6aab0b19e fix failing Slf4jLoggerFactoryTest
new 6dc31359b Merge pull request #55 from schipplock/main
6aab0b19e is described below
commit 6aab0b19ec7593c5b99bb2269a95b82e11e10139
Author: Andreas Schipplock <[email protected]>
AuthorDate: Sat Dec 16 14:24:07 2023 +0100
fix failing Slf4jLoggerFactoryTest
- the test failed when executed under Windows due to a hardcoded new line
separator
---
.../java/org/apache/openwebbeans/slf4j/Slf4jLoggerFactoryTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/webbeans-slf4j/src/test/java/org/apache/openwebbeans/slf4j/Slf4jLoggerFactoryTest.java
b/webbeans-slf4j/src/test/java/org/apache/openwebbeans/slf4j/Slf4jLoggerFactoryTest.java
index 64e267c78..e8a1d154d 100644
---
a/webbeans-slf4j/src/test/java/org/apache/openwebbeans/slf4j/Slf4jLoggerFactoryTest.java
+++
b/webbeans-slf4j/src/test/java/org/apache/openwebbeans/slf4j/Slf4jLoggerFactoryTest.java
@@ -31,6 +31,8 @@ import java.util.logging.Logger;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import static java.lang.String.format;
+
public class Slf4jLoggerFactoryTest {
@Test
public void ensureLogGoesOnSlf4j() {
@@ -65,7 +67,7 @@ public class Slf4jLoggerFactoryTest {
System.setErr(original);
}
assertEquals(
- "[main] INFO " + getClass().getName() + " - test log\n",
+ format("[main] INFO %s - test log%s", getClass().getName(),
System.lineSeparator()),
new String(buffer.toByteArray(), StandardCharsets.UTF_8));
}
}