@@ -39,7 +39,7 @@ public async Task Unauthorized_Client()
3939 {
4040 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Unauthorized ) ;
4141
42- var client = PipelineFactory . CreateClient ( o => _options ( o ) , handler ) ;
42+ var client = await PipelineFactory . CreateClient ( o => _options ( o ) , handler ) ;
4343 client . SetBearerToken ( "sometoken" ) ;
4444
4545 var result = await client . GetAsync ( "http://test" ) ;
@@ -51,7 +51,7 @@ public async Task ActiveToken()
5151 {
5252 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active ) ;
5353
54- var client = PipelineFactory . CreateClient ( _options , handler ) ;
54+ var client = await PipelineFactory . CreateClient ( _options , handler ) ;
5555 client . SetBearerToken ( "sometoken" ) ;
5656
5757 var result = await client . GetAsync ( "http://test" ) ;
@@ -76,7 +76,7 @@ public async Task TwoConcurrentCalls_FirstIntrospectDoesNotThrow_SecondShouldNot
7676
7777 var requestCount = 0 ;
7878
79- var messageHandler = PipelineFactory . CreateHandler ( o =>
79+ var messageHandler = await PipelineFactory . CreateHandler ( o =>
8080 {
8181 _options ( o ) ;
8282
@@ -129,7 +129,7 @@ public async Task ActiveToken_WithTwoConcurrentCalls_FirstCancelled_SecondShould
129129 var waitForTheSecondRequestToStart = new ManualResetEvent ( initialState : false ) ;
130130 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active ) ;
131131
132- var messageHandler = PipelineFactory . CreateHandler ( o =>
132+ var messageHandler = await PipelineFactory . CreateHandler ( o =>
133133 {
134134 _options ( o ) ;
135135
@@ -173,7 +173,7 @@ public async Task ActiveToken_With_ClientAssertion(int ttl, string assertion1, s
173173 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active ) ;
174174 var count = 0 ;
175175
176- var client = PipelineFactory . CreateClient ( o =>
176+ var client = await PipelineFactory . CreateClient ( o =>
177177 {
178178 _options ( o ) ;
179179 o . ClientSecret = null ;
@@ -221,7 +221,7 @@ public async Task Active_token_with_inline_event_events_should_be_called()
221221 bool ? validatedCalled = null ;
222222 bool ? failureCalled = null ;
223223
224- var client = PipelineFactory . CreateClient ( o =>
224+ var client = await PipelineFactory . CreateClient ( o =>
225225 {
226226 _options ( o ) ;
227227
@@ -256,7 +256,7 @@ public async Task ActiveToken_With_Caching_Ttl_Longer_Than_Duration()
256256 {
257257 var introspectionCalls = 0 ;
258258 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active , TimeSpan . FromHours ( 1 ) ) ;
259- var client = PipelineFactory . CreateClient ( o =>
259+ var client = await PipelineFactory . CreateClient ( o =>
260260 {
261261 _options ( o ) ;
262262
@@ -284,7 +284,7 @@ public async Task ActiveToken_With_Caching_Ttl_Shorter_Than_Duration()
284284 {
285285 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active , TimeSpan . FromMinutes ( 5 ) ) ;
286286
287- var client = PipelineFactory . CreateClient ( o =>
287+ var client = await PipelineFactory . CreateClient ( o =>
288288 {
289289 _options ( o ) ;
290290
@@ -305,7 +305,7 @@ public async Task InactiveToken()
305305 {
306306 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Inactive ) ;
307307
308- var client = PipelineFactory . CreateClient ( o => _options ( o ) , handler ) ;
308+ var client = await PipelineFactory . CreateClient ( o => _options ( o ) , handler ) ;
309309 client . SetBearerToken ( "sometoken" ) ;
310310
311311 var result = await client . GetAsync ( "http://test" ) ;
@@ -319,7 +319,7 @@ public async Task InActive_token_with_inline_event_events_should_be_called()
319319 bool ? validatedCalled = null ;
320320 bool ? failureCalled = null ;
321321
322- var client = PipelineFactory . CreateClient ( o =>
322+ var client = await PipelineFactory . CreateClient ( o =>
323323 {
324324 _options ( o ) ;
325325
@@ -355,7 +355,7 @@ public async Task ActiveToken_With_SavedToken()
355355 var expectedToken = "expected_token" ;
356356 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active ) ;
357357
358- var client = PipelineFactory . CreateClient ( o =>
358+ var client = await PipelineFactory . CreateClient ( o =>
359359 {
360360 _options ( o ) ;
361361
@@ -380,7 +380,7 @@ public async Task ActiveToken_With_SavedToken_And_Caching()
380380 var expectedToken = "expected_token" ;
381381 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active , TimeSpan . FromHours ( 1 ) ) ;
382382
383- var server = PipelineFactory . CreateServer ( o =>
383+ var server = await PipelineFactory . CreateServer ( o =>
384384 {
385385 _options ( o ) ;
386386
@@ -411,7 +411,7 @@ public async Task ActiveToken_With_SavedToken_And_Caching_With_Cache_Key_Prefix(
411411 var cacheKeyPrefix = "KeyPrefix" ;
412412 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active , TimeSpan . FromHours ( 1 ) ) ;
413413
414- var server = PipelineFactory . CreateServer ( o =>
414+ var server = await PipelineFactory . CreateServer ( o =>
415415 {
416416 _options ( o ) ;
417417
@@ -442,7 +442,7 @@ public async Task Repeated_active_token_with_caching_enabled_should_hit_cache()
442442 var expectedToken = "expected_token" ;
443443 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active , TimeSpan . FromHours ( 1 ) ) ;
444444
445- var server = PipelineFactory . CreateServer ( o =>
445+ var server = await PipelineFactory . CreateServer ( o =>
446446 {
447447 _options ( o ) ;
448448
@@ -469,7 +469,7 @@ public async Task Repeated_inactive_token_with_caching_enabled_should_hit_cache(
469469 var expectedToken = "expected_token" ;
470470 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Inactive ) ;
471471
472- var server = PipelineFactory . CreateServer ( o =>
472+ var server = await PipelineFactory . CreateServer ( o =>
473473 {
474474 _options ( o ) ;
475475
@@ -496,7 +496,7 @@ public async Task ActiveToken_With_Discovery_Unavailable_On_First_Request()
496496 {
497497 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active ) ;
498498
499- var client = PipelineFactory . CreateClient ( o => _options ( o ) , handler ) ;
499+ var client = await PipelineFactory . CreateClient ( o => _options ( o ) , handler ) ;
500500 client . SetBearerToken ( "sometoken" ) ;
501501
502502 handler . IsDiscoveryFailureTest = true ;
@@ -512,7 +512,7 @@ public async Task ActiveToken_RequestSending_AdditionalParameter_with_inline_eve
512512 {
513513 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active ) ;
514514
515- var client = PipelineFactory . CreateClient ( o =>
515+ var client = await PipelineFactory . CreateClient ( o =>
516516 {
517517 _options ( o ) ;
518518
@@ -538,7 +538,7 @@ public async Task ActiveToken_expires_while_cached()
538538 var introspectionRequestsMade = 0 ;
539539 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active , TimeSpan . FromMilliseconds ( 250 ) ) ;
540540
541- var client = PipelineFactory . CreateClient ( o =>
541+ var client = await PipelineFactory . CreateClient ( o =>
542542 {
543543 _options ( o ) ;
544544
@@ -570,7 +570,7 @@ public async Task ActiveToken_can_override_cache_settings_to_prevent_caching()
570570 var token = "sometoken" ;
571571 var handler = new IntrospectionEndpointHandler ( IntrospectionEndpointHandler . Behavior . Active , TimeSpan . FromMinutes ( 5 ) ) ;
572572
573- var server = PipelineFactory . CreateServer ( o =>
573+ var server = await PipelineFactory . CreateServer ( o =>
574574 {
575575 _options ( o ) ;
576576
0 commit comments