Skip to content

Commit c45f110

Browse files
committedSep 6, 2024·
check for Mac OS X
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent 00c6f5e commit c45f110

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

Diff for: ‎logback-classic-blackbox/src/test/java/ch/qos/logback/classic/blackbox/net/SMTPAppender_GreenTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ void waitUntilEmailIsSent() throws InterruptedException {
168168
ExecutorService es = loggerContext.getExecutorService();
169169
es.shutdown();
170170
boolean terminated = es.awaitTermination(TIMEOUT, TimeUnit.MILLISECONDS);
171+
171172
// this assertion may be needlessly strict, skipped on MacOS
172-
System.getProperty("os.name");
173173
if(!terminated && !EnvUtil.isMacOs()) {
174174
fail("executor elapsed before accorded delay " + System.getProperty("os.name"));
175175
}

Diff for: ‎logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static public boolean isJaninoAvailable() {
128128

129129
public static boolean isMacOs() {
130130
String os = System.getProperty("os.name");
131-
return os.contains("mac");
131+
return os.toLowerCase().contains("mac");
132132
}
133133

134134
public static boolean isWindows() {

0 commit comments

Comments
 (0)
Please sign in to comment.