Skip to content

Commit

Permalink
Another fix for test runs without results
Browse files Browse the repository at this point in the history
  • Loading branch information
daveaglick committed Jan 28, 2019
1 parent ba59a1e commit 3c7a073
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.2

- [Fix] Another fix for test runs without any results

# 1.0.1

- [Fix] Makes sure not to end test runs that didn't send any results
Expand Down
16 changes: 8 additions & 8 deletions src/AzurePipelines.TestLogger/LoggerQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,15 @@ private async Task SendTestsCompleted(CancellationToken cancellationToken)
""completedDate"": ""{completedDate}""
}}")) + " ]";
await _apiClient.SendAsync(new HttpMethod("PATCH"), TestRunEndpoint, "5.0-preview.5", parentRequest, cancellationToken).ConfigureAwait(false);
}

// Mark the overall test run as completed
string testRunRequest = $@"{{
""state"": ""Completed"",
""startedDate"": ""{StartedDate.ToString("yyyy-MM-ddTHH:mm:ss.FFFZ")}"",
""completedDate"": ""{completedDate}""
}}";
await _apiClient.SendAsync(new HttpMethod("PATCH"), $"/{RunId}", "5.0-preview.2", testRunRequest, cancellationToken).ConfigureAwait(false);
// Mark the overall test run as completed
string testRunRequest = $@"{{
""state"": ""Completed"",
""startedDate"": ""{StartedDate.ToString("yyyy-MM-ddTHH:mm:ss.FFFZ")}"",
""completedDate"": ""{completedDate}""
}}";
await _apiClient.SendAsync(new HttpMethod("PATCH"), $"/{RunId}", "5.0-preview.2", testRunRequest, cancellationToken).ConfigureAwait(false);
}
}
}
}

0 comments on commit 3c7a073

Please sign in to comment.