File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
src/Tests/Microsoft.Diagnostics.Monitoring.Tool.FunctionalTests Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,19 @@ private Task DumpTestCore(DiagnosticPortConnectionMode mode, DumpType type)
61
61
{
62
62
int processId = await runner . ProcessIdTask ;
63
63
64
- using ResponseStreamHolder holder = await client . CaptureDumpAsync ( processId , type ) ;
65
- Assert . NotNull ( holder ) ;
64
+ // In .Net 10, dump operations sometimes fail due to a lock on /proc/<pid>/mem.
65
+ using ResponseStreamHolder holder = await RetryUtilities . RetryAsync < ResponseStreamHolder > (
66
+ func : async ( ) =>
67
+ {
68
+ ResponseStreamHolder holder = await client . CaptureDumpAsync ( processId , type ) ;
69
+ Assert . NotNull ( holder ) ;
70
+ holder . Response . EnsureSuccessStatusCode ( ) ;
71
+ return holder ;
72
+ } ,
73
+ shouldRetry : ( Exception e ) =>
74
+ ( ( e is HttpRequestException requestException ) &&
75
+ ( requestException . StatusCode == System . Net . HttpStatusCode . BadRequest ) ) ,
76
+ outputHelper : _outputHelper ) ;
66
77
67
78
// The dump operation may still be in progress but the process should still be discoverable.
68
79
// If this check fails, then the dump operation is causing dotnet-monitor to not be able
You can’t perform that action at this time.
0 commit comments