Skip to content

Commit

Permalink
Consider internal messages might starts with extra symbols
Browse files Browse the repository at this point in the history
Fix #35
  • Loading branch information
nvborisenko committed Sep 16, 2019
1 parent 4059644 commit 2151d1f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/ReportPortal.VSTest.TestLogger/ReportPortalLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,17 @@ private void Events_TestResult(object sender, TestResultEventArgs e)

try
{
var sharedMessage =
Client.Converters.ModelSerializer.Deserialize<SharedLogMessage>(line);
SharedLogMessage sharedMessage;

// SpecRun adapter add this for output messages, just trim it for internal messages
if (line.StartsWith("-> "))
{
sharedMessage = Client.Converters.ModelSerializer.Deserialize<SharedLogMessage>(line.Substring(3));
}
else
{
sharedMessage = Client.Converters.ModelSerializer.Deserialize<SharedLogMessage>(line);
}

var logRequest = new AddLogItemRequest
{
Expand Down

0 comments on commit 2151d1f

Please sign in to comment.