Skip to content

Commit ceabd3d

Browse files
Fix stress test logger throwing when message is empty (#648)
1 parent 15b46fc commit ceabd3d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Neo4j.Driver/Neo4j.Driver.Tests.Integration/Stress/StressTest.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,21 @@ public StressTestLogger(ITestOutputHelper output, StressTestMinLogLevel minLevel
108108
public void Error(Exception cause, string message, params object[] args)
109109
{
110110
if (_minLevel <= StressTestMinLogLevel.Error)
111-
Write(message, args);
111+
{
112+
if (!string.IsNullOrEmpty(message))
113+
Write(message, args);
114+
_output.WriteLine(cause.Message);
115+
}
112116
}
113117

114118
public void Warn(Exception cause, string message, params object[] args)
115119
{
116120
if (_minLevel <= StressTestMinLogLevel.Warn)
117-
Write(message, args);
121+
{
122+
if (!string.IsNullOrEmpty(message))
123+
Write(message, args);
124+
_output.WriteLine(cause.Message);
125+
}
118126
}
119127

120128
public void Info(string message, params object[] args)

0 commit comments

Comments
 (0)