@@ -39,7 +39,7 @@ public async Task InitializeAsync()
3939 {
4040 LoggerFactory factory = new ( ) ;
4141 _psesProcess = new PsesStdioProcess ( factory , true ) ;
42- await _psesProcess . Start ( ) . ConfigureAwait ( true ) ;
42+ await _psesProcess . Start ( ) ;
4343
4444 TaskCompletionSource < bool > initialized = new ( ) ;
4545
@@ -91,9 +91,9 @@ public async Task InitializeAsync()
9191 // This tells us that we are ready to send messages to PSES... but are not stuck waiting for
9292 // Initialized.
9393#pragma warning disable CS4014
94- PsesDebugAdapterClient . Initialize ( CancellationToken . None ) . ConfigureAwait ( true ) ;
94+ PsesDebugAdapterClient . Initialize ( CancellationToken . None ) ;
9595#pragma warning restore CS4014
96- await initialized . Task . ConfigureAwait ( true ) ;
96+ await initialized . Task ;
9797 }
9898
9999 public async Task DisposeAsync ( )
@@ -102,8 +102,8 @@ await PsesDebugAdapterClient.RequestDisconnect(new DisconnectArguments
102102 {
103103 Restart = false ,
104104 TerminateDebuggee = true
105- } ) . ConfigureAwait ( true ) ;
106- await _psesProcess . Stop ( ) . ConfigureAwait ( true ) ;
105+ } ) ;
106+ await _psesProcess . Stop ( ) ;
107107 }
108108
109109 public void Dispose ( )
@@ -164,10 +164,10 @@ private static async Task<string[]> GetLog()
164164 {
165165 for ( int i = 0 ; ! File . Exists ( s_testOutputPath ) && i < 60 ; i ++ )
166166 {
167- await Task . Delay ( 1000 ) . ConfigureAwait ( true ) ;
167+ await Task . Delay ( 1000 ) ;
168168 }
169169 // Sleep one more time after the file exists so whatever is writing can finish.
170- await Task . Delay ( 1000 ) . ConfigureAwait ( true ) ;
170+ await Task . Delay ( 1000 ) ;
171171 return File . ReadLines ( s_testOutputPath ) . ToArray ( ) ;
172172 }
173173
@@ -186,10 +186,10 @@ public void CanInitializeWithCorrectServerSettings()
186186 public async Task UsesDotSourceOperatorAndQuotesAsync ( )
187187 {
188188 string filePath = NewTestFile ( GenerateScriptFromLoggingStatements ( "$($MyInvocation.Line)" ) ) ;
189- await PsesDebugAdapterClient . LaunchScript ( filePath , Started ) . ConfigureAwait ( true ) ;
190- ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) . ConfigureAwait ( true ) ;
189+ await PsesDebugAdapterClient . LaunchScript ( filePath , Started ) ;
190+ ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) ;
191191 Assert . NotNull ( configDoneResponse ) ;
192- Assert . Collection ( await GetLog ( ) . ConfigureAwait ( true ) ,
192+ Assert . Collection ( await GetLog ( ) ,
193193 ( i ) => Assert . StartsWith ( ". '" , i ) ) ;
194194 }
195195
@@ -198,11 +198,11 @@ public async Task CanLaunchScriptWithNoBreakpointsAsync()
198198 {
199199 string filePath = NewTestFile ( GenerateScriptFromLoggingStatements ( "works" ) ) ;
200200
201- await PsesDebugAdapterClient . LaunchScript ( filePath , Started ) . ConfigureAwait ( true ) ;
201+ await PsesDebugAdapterClient . LaunchScript ( filePath , Started ) ;
202202
203- ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) . ConfigureAwait ( true ) ;
203+ ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) ;
204204 Assert . NotNull ( configDoneResponse ) ;
205- Assert . Collection ( await GetLog ( ) . ConfigureAwait ( true ) ,
205+ Assert . Collection ( await GetLog ( ) ,
206206 ( i ) => Assert . Equal ( "works" , i ) ) ;
207207 }
208208
@@ -218,32 +218,32 @@ public async Task CanSetBreakpointsAsync()
218218 "after breakpoint"
219219 ) ) ;
220220
221- await PsesDebugAdapterClient . LaunchScript ( filePath , Started ) . ConfigureAwait ( true ) ;
221+ await PsesDebugAdapterClient . LaunchScript ( filePath , Started ) ;
222222
223223 // {"command":"setBreakpoints","arguments":{"source":{"name":"dfsdfg.ps1","path":"/Users/tyleonha/Code/PowerShell/Misc/foo/dfsdfg.ps1"},"lines":[2],"breakpoints":[{"line":2}],"sourceModified":false},"type":"request","seq":3}
224224 SetBreakpointsResponse setBreakpointsResponse = await PsesDebugAdapterClient . SetBreakpoints ( new SetBreakpointsArguments
225225 {
226226 Source = new Source { Name = Path . GetFileName ( filePath ) , Path = filePath } ,
227227 Breakpoints = new SourceBreakpoint [ ] { new SourceBreakpoint { Line = 2 } } ,
228228 SourceModified = false ,
229- } ) . ConfigureAwait ( true ) ;
229+ } ) ;
230230
231231 Breakpoint breakpoint = setBreakpointsResponse . Breakpoints . First ( ) ;
232232 Assert . True ( breakpoint . Verified ) ;
233233 Assert . Equal ( filePath , breakpoint . Source . Path , ignoreCase : s_isWindows ) ;
234234 Assert . Equal ( 2 , breakpoint . Line ) ;
235235
236- ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) . ConfigureAwait ( true ) ;
236+ ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) ;
237237 Assert . NotNull ( configDoneResponse ) ;
238- Assert . Collection ( await GetLog ( ) . ConfigureAwait ( true ) ,
238+ Assert . Collection ( await GetLog ( ) ,
239239 ( i ) => Assert . Equal ( "before breakpoint" , i ) ) ;
240240 File . Delete ( s_testOutputPath ) ;
241241
242242 ContinueResponse continueResponse = await PsesDebugAdapterClient . RequestContinue (
243- new ContinueArguments { ThreadId = 1 } ) . ConfigureAwait ( true ) ;
243+ new ContinueArguments { ThreadId = 1 } ) ;
244244
245245 Assert . NotNull ( continueResponse ) ;
246- Assert . Collection ( await GetLog ( ) . ConfigureAwait ( true ) ,
246+ Assert . Collection ( await GetLog ( ) ,
247247 ( i ) => Assert . Equal ( "at breakpoint" , i ) ,
248248 ( i ) => Assert . Equal ( "after breakpoint" , i ) ) ;
249249 }
@@ -274,24 +274,24 @@ public async Task CanStepPastSystemWindowsForms()
274274 "Write-Host $form"
275275 } ) ) ;
276276
277- await PsesDebugAdapterClient . LaunchScript ( filePath , Started ) . ConfigureAwait ( true ) ;
277+ await PsesDebugAdapterClient . LaunchScript ( filePath , Started ) ;
278278
279279 SetFunctionBreakpointsResponse setBreakpointsResponse = await PsesDebugAdapterClient . SetFunctionBreakpoints (
280280 new SetFunctionBreakpointsArguments
281281 {
282282 Breakpoints = new FunctionBreakpoint [ ]
283283 { new FunctionBreakpoint { Name = "Write-Host" , } }
284- } ) . ConfigureAwait ( true ) ;
284+ } ) ;
285285
286286 Breakpoint breakpoint = setBreakpointsResponse . Breakpoints . First ( ) ;
287287 Assert . True ( breakpoint . Verified ) ;
288288
289- ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) . ConfigureAwait ( true ) ;
289+ ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) ;
290290 Assert . NotNull ( configDoneResponse ) ;
291- await Task . Delay ( 5000 ) . ConfigureAwait ( true ) ;
291+ await Task . Delay ( 5000 ) ;
292292
293293 VariablesResponse variablesResponse = await PsesDebugAdapterClient . RequestVariables (
294- new VariablesArguments { VariablesReference = 1 } ) . ConfigureAwait ( true ) ;
294+ new VariablesArguments { VariablesReference = 1 } ) ;
295295
296296 Variable form = variablesResponse . Variables . FirstOrDefault ( v => v . Name == "$form" ) ;
297297 Assert . NotNull ( form ) ;
@@ -312,15 +312,15 @@ public async Task CanLaunchScriptWithCommentedLastLineAsync()
312312 // PsesLaunchRequestArguments.Script, which is then assigned to
313313 // DebugStateService.ScriptToLaunch in that handler, and finally used by the
314314 // ConfigurationDoneHandler in LaunchScriptAsync.
315- await PsesDebugAdapterClient . LaunchScript ( script , Started ) . ConfigureAwait ( true ) ;
315+ await PsesDebugAdapterClient . LaunchScript ( script , Started ) ;
316316
317- ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) . ConfigureAwait ( true ) ;
317+ ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) ;
318318 Assert . NotNull ( configDoneResponse ) ;
319319 // We can check that the script was invoked as expected, which is to dot-source a script
320320 // block with the contents surrounded by newlines. While we can't check that the last
321321 // line was a curly brace by itself, we did check that the contents ended with a
322322 // comment, so if this output exists then the bug did not recur.
323- Assert . Collection ( await GetLog ( ) . ConfigureAwait ( true ) ,
323+ Assert . Collection ( await GetLog ( ) ,
324324 ( i ) => Assert . Equal ( ". {" , i ) ,
325325 ( i ) => Assert . Equal ( "" , i ) ) ;
326326 }
@@ -342,9 +342,9 @@ public async Task CanRunPesterTestFile()
342342 using CancellationTokenSource cts = new(5000);
343343 while (!File.Exists(pesterLog) && !cts.Token.IsCancellationRequested)
344344 {
345- await Task.Delay(1000).ConfigureAwait(true) ;
345+ await Task.Delay(1000);
346346 }
347- await Task.Delay(15000).ConfigureAwait(true) ;
347+ await Task.Delay(15000);
348348 _output.WriteLine(File.ReadAllText(pesterLog));
349349 */
350350
@@ -360,9 +360,9 @@ public async Task CanRunPesterTestFile()
360360 }
361361 }" , isPester : true ) ;
362362
363- await PsesDebugAdapterClient . LaunchScript ( $ "Invoke-Pester -Script '{ pesterTest } '", Started ) . ConfigureAwait ( true ) ;
364- await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) . ConfigureAwait ( true ) ;
365- Assert . Collection ( await GetLog ( ) . ConfigureAwait ( true ) , ( i ) => Assert . Equal ( "pester" , i ) ) ;
363+ await PsesDebugAdapterClient . LaunchScript ( $ "Invoke-Pester -Script '{ pesterTest } '", Started ) ;
364+ await PsesDebugAdapterClient . RequestConfigurationDone ( new ConfigurationDoneArguments ( ) ) ;
365+ Assert . Collection ( await GetLog ( ) , ( i ) => Assert . Equal ( "pester" , i ) ) ;
366366 }
367367 }
368368}
0 commit comments