File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,11 +99,16 @@ protected virtual void Dispose(bool disposing)
9999 if ( ! _disposed )
100100 {
101101 // Ensure the file is closed before attempting to delete it
102- Task . Delay ( 100 ) . Wait ( ) ;
103- if ( disposing && Directory . Exists ( _testDirectory ) )
102+ if ( disposing )
104103 {
105- // Dispose managed resources
106- Directory . Delete ( _testDirectory , true ) ;
104+
105+ Task . Delay ( 100 ) . Wait ( ) ;
106+
107+ if ( Directory . Exists ( _testDirectory ) )
108+ {
109+ // Dispose managed resources
110+ Directory . Delete ( _testDirectory , true ) ;
111+ }
107112 }
108113
109114 // Dispose unmanaged resources (if any)
Original file line number Diff line number Diff line change @@ -270,11 +270,16 @@ protected virtual void Dispose(bool disposing)
270270 {
271271 if ( ! _disposed )
272272 {
273- if ( disposing && Directory . Exists ( _testDirectory ) )
273+ if ( disposing )
274274 {
275- // Dispose managed resources
276- File . Delete ( _testSolutionPath ) ;
277- Directory . Delete ( _testDirectory , true ) ;
275+ Task . Delay ( 100 ) . Wait ( ) ;
276+
277+ if ( Directory . Exists ( _testDirectory ) )
278+ {
279+ // Dispose managed resources
280+ File . Delete ( _testSolutionPath ) ;
281+ Directory . Delete ( _testDirectory , true ) ;
282+ }
278283 }
279284
280285 // Dispose unmanaged resources (if any)
You can’t perform that action at this time.
0 commit comments