@@ -227,7 +227,8 @@ private async Task SendTestResults(IEnumerable<IGrouping<string, ITestResult>> t
227227 parent . Duration += Convert . ToInt64 ( x . Sum ( t => t . Duration . TotalMilliseconds ) ) ;
228228 return $@ "{{
229229 ""id"": { parent . Id } ,
230- ""durationInMs"": { parent . Duration } ,
230+ ""durationInMs"": { parent . Duration . ToString ( CultureInfo . InvariantCulture ) } ,
231+ ""completedDate"": ""{ DateTime . UtcNow . ToString ( "yyyy-MM-ddTHH:mm:ss.FFFZ" ) } "",
231232 { failedOutcome }
232233 ""subResults"": { subResults }
233234 }}" ;
@@ -288,13 +289,15 @@ private async Task SendTestsCompleted(CancellationToken cancellationToken)
288289 string parentRequest = "[ " + string . Join ( ", " , Parents . Values . Select ( x =>
289290 $@ "{{
290291 ""id"": { x . Id } ,
291- ""state"": ""Completed""
292+ ""state"": ""Completed"",
293+ ""completedDate"": ""{ DateTime . UtcNow . ToString ( "yyyy-MM-ddTHH:mm:ss.FFFZ" ) } ""
292294 }}" ) ) + " ]" ;
293295 await _apiClient . SendAsync ( new HttpMethod ( "PATCH" ) , TestRunEndpoint , "5.0-preview.5" , parentRequest , cancellationToken ) ;
294296
295297 // Mark the overall test run as completed
296298 string testRunRequest = $@ "{{
297- ""state"": ""Completed""
299+ ""state"": ""Completed"",
300+ ""completedDate"": ""{ DateTime . UtcNow . ToString ( "yyyy-MM-ddTHH:mm:ss.FFFZ" ) } ""
298301 }}" ;
299302 await _apiClient . SendAsync ( new HttpMethod ( "PATCH" ) , $ "/{ RunId } ", "5.0-preview.2" , testRunRequest , cancellationToken ) ;
300303 }
0 commit comments