Skip to content

Commit 1bc5dbd

Browse files
committed
fix tests for mono
1 parent 428400a commit 1bc5dbd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/log4net.Tests/Appender/RollingFileAppenderTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ namespace log4net.Tests.Appender
4141
[TestFixture]
4242
public sealed class RollingFileAppenderTest
4343
{
44+
private static readonly bool isMono = Type.GetType("Mono.Runtime") is not null;
45+
4446
private const string c_fileName = "test_41d3d834_4320f4da.log";
4547

4648
private const string c_testMessage98Chars =
@@ -1457,8 +1459,11 @@ public void TestExclusiveLockLocks()
14571459
}
14581460
catch (IOException e1)
14591461
{
1460-
Assert.AreEqual("The process cannot access the file ", e1.Message.Substring(0, 35),
1462+
if (!isMono)
1463+
{
1464+
Assert.AreEqual("The process cannot access the file ", e1.Message.Substring(0, 35),
14611465
"Unexpected exception");
1466+
}
14621467
locked = true;
14631468
}
14641469

0 commit comments

Comments
 (0)