diff --git a/ReleaseNotes.md b/ReleaseNotes.md index a82ceb2..5b2ebbc 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -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 diff --git a/src/AzurePipelines.TestLogger/LoggerQueue.cs b/src/AzurePipelines.TestLogger/LoggerQueue.cs index fd7c079..41f55cd 100644 --- a/src/AzurePipelines.TestLogger/LoggerQueue.cs +++ b/src/AzurePipelines.TestLogger/LoggerQueue.cs @@ -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); + } } } } \ No newline at end of file