@@ -52,7 +52,7 @@ public async Task WriteCache_WritesInL1L2_TestAsync(bool enableAsyncL2Write)
5252
5353 // Act
5454 TestDistributedCache . ResetEvent . Reset ( ) ;
55- await _testCacheAdapter . TestWriteCacheBytesAsync ( DefaultCacheKey , cache ) . ConfigureAwait ( false ) ;
55+ await _testCacheAdapter . TestWriteCacheBytesAsync ( DefaultCacheKey , cache ) ;
5656
5757 // Assert
5858 Assert . Equal ( 1 , _testCacheAdapter . _memoryCache . Count ) ;
@@ -64,29 +64,29 @@ public async Task WriteCache_WritesInL1L2_TestAsync(bool enableAsyncL2Write)
6464 public async Task WriteCache_NegativeExpiry_TestAsync ( )
6565 {
6666 // Arrange & Act
67- await CreateL1L2TestWithSerializerHints ( System . DateTimeOffset . Now - System . TimeSpan . FromHours ( 1 ) , 0 ) . ConfigureAwait ( false ) ;
67+ await CreateL1L2TestWithSerializerHints ( System . DateTimeOffset . Now - System . TimeSpan . FromHours ( 1 ) , 0 ) ;
6868
6969 // Assert
7070 Assert . NotNull ( _testCacheAdapter . _memoryCache ) ;
7171 Assert . Null ( _testCacheAdapter . _memoryCache . Get ( DefaultCacheKey ) ) ;
7272
73- await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) . ConfigureAwait ( false ) ;
73+ await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) ;
7474 Assert . Equal ( 1 , _testCacheAdapter . _memoryCache . Count ) ;
7575 }
7676
7777 [ Fact ]
7878 public async Task WriteCacheL1L2_NegativeExpiry_TestAsync ( )
7979 {
8080 // Arrange & Act
81- await CreateL1L2TestWithSerializerHints ( System . DateTimeOffset . Now - System . TimeSpan . FromHours ( 1 ) , 0 ) . ConfigureAwait ( false ) ;
81+ await CreateL1L2TestWithSerializerHints ( System . DateTimeOffset . Now - System . TimeSpan . FromHours ( 1 ) , 0 ) ;
8282
8383 // Assert
8484 Assert . NotNull ( _testCacheAdapter . _memoryCache ) ;
8585 Assert . Null ( _testCacheAdapter . _memoryCache . Get ( DefaultCacheKey ) ) ;
8686 var options = ( _testCacheAdapter . _distributedCache as TestDistributedCache ) ! . GetDistributedCacheEntryOptions ( DefaultCacheKey ) ;
8787 Assert . NotNull ( options ) ;
8888 Assert . NotNull ( options . AbsoluteExpiration ) ;
89- await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) . ConfigureAwait ( false ) ;
89+ await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) ;
9090 Assert . Equal ( 1 , _testCacheAdapter . _memoryCache . Count ) ;
9191 }
9292
@@ -96,7 +96,7 @@ public async Task WriteCacheL1L2_PositiveExpiry_TestAsync()
9696 // Arrange & Act
9797 var timespan = System . TimeSpan . FromHours ( 1 ) ;
9898 var expiry = System . DateTimeOffset . UtcNow + timespan ;
99- await CreateL1L2TestWithSerializerHints ( expiry , 1 ) . ConfigureAwait ( false ) ;
99+ await CreateL1L2TestWithSerializerHints ( expiry , 1 ) ;
100100
101101 // Assert
102102 Assert . NotNull ( _testCacheAdapter . _memoryCache ) ;
@@ -107,20 +107,20 @@ public async Task WriteCacheL1L2_PositiveExpiry_TestAsync()
107107 Assert . NotNull ( options ) ;
108108 Assert . NotNull ( options . AbsoluteExpiration ) ;
109109 Assert . Equal ( expiry , options . AbsoluteExpiration . Value ) ;
110- await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) . ConfigureAwait ( false ) ;
110+ await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) ;
111111 Assert . Equal ( 1 , _testCacheAdapter . _memoryCache . Count ) ;
112112 }
113113
114114 [ Fact ]
115115 public async Task WriteCacheL1L2_PositiveExpiryAndAbsoluteOptions_TestAsync ( )
116116 {
117- await CreateL1L2TestWithAbsoluteOptions ( 1.5 ) . ConfigureAwait ( false ) ;
117+ await CreateL1L2TestWithAbsoluteOptions ( 1.5 ) ;
118118 }
119119
120120 [ Fact ]
121121 public async Task WriteCacheL1L2_PositiveExpiryAndAbsoluteOptionsLessThanSuggestedExpiry_TestAsync ( )
122122 {
123- await CreateL1L2TestWithAbsoluteOptions ( .5 ) . ConfigureAwait ( false ) ;
123+ await CreateL1L2TestWithAbsoluteOptions ( .5 ) ;
124124 }
125125
126126 private async Task CreateL1L2TestWithAbsoluteOptions ( double time )
@@ -131,7 +131,7 @@ private async Task CreateL1L2TestWithAbsoluteOptions(double time)
131131 var absoluteOptions = Provider . GetService < IOptions < MsalDistributedTokenCacheAdapterOptions > > ( ) ;
132132 Assert . NotNull ( absoluteOptions ) ;
133133 absoluteOptions . Value . AbsoluteExpiration = System . DateTimeOffset . Now + System . TimeSpan . FromHours ( time ) ;
134- await CreateL1L2TestWithSerializerHints ( suggestedExpiry , 1 ) . ConfigureAwait ( false ) ;
134+ await CreateL1L2TestWithSerializerHints ( suggestedExpiry , 1 ) ;
135135
136136 // Assert
137137 Assert . NotNull ( _testCacheAdapter . _memoryCache ) ;
@@ -150,7 +150,7 @@ private async Task CreateL1L2TestWithAbsoluteOptions(double time)
150150 }
151151
152152 absoluteOptions . Value . AbsoluteExpiration = null ;
153- await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) . ConfigureAwait ( false ) ;
153+ await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) ;
154154 Assert . Equal ( 1 , _testCacheAdapter . _memoryCache . Count ) ;
155155 }
156156
@@ -169,7 +169,7 @@ private async Task CreateL1L2TestWithSerializerHints(
169169
170170 // Act
171171 TestDistributedCache . ResetEvent . Reset ( ) ;
172- await _testCacheAdapter . TestWriteCacheBytesAsync ( DefaultCacheKey , cache , cacheSerializerHints ) . ConfigureAwait ( false ) ;
172+ await _testCacheAdapter . TestWriteCacheBytesAsync ( DefaultCacheKey , cache , cacheSerializerHints ) ;
173173
174174 // Assert
175175 Assert . Equal ( memoryCacheExpectedCount , _testCacheAdapter . _memoryCache . Count ) ;
@@ -192,7 +192,7 @@ public async Task SetL1Cache_ReadL1_TestAsync()
192192 Assert . Empty ( L2Cache . _dict ) ;
193193
194194 // Act
195- byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) . ConfigureAwait ( false ) ;
195+ byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) ;
196196
197197 // Assert
198198 Assert . NotNull ( result ) ;
@@ -214,7 +214,7 @@ public async Task EmptyL1Cache_ReadL2AndSetL1_TestAsync()
214214 Assert . Equal ( 0 , _testCacheAdapter . _memoryCache . Count ) ;
215215
216216 // Act
217- byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) . ConfigureAwait ( false ) ;
217+ byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) ;
218218
219219 // Assert
220220 Assert . NotNull ( result ) ;
@@ -238,7 +238,7 @@ public async Task EmptyL1Cache_ReadL2AndSetL1_ForTelemetryTestAsync()
238238 Assert . Equal ( 0 , _testCacheAdapter . _memoryCache . Count ) ;
239239
240240 // Act
241- byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) . ConfigureAwait ( false ) ;
241+ byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) ;
242242
243243 // Assert
244244 Assert . NotNull ( result ) ;
@@ -248,7 +248,7 @@ public async Task EmptyL1Cache_ReadL2AndSetL1_ForTelemetryTestAsync()
248248 Assert . Equal ( CacheLevel . L2Cache , telemetryData . CacheLevel ) ;
249249
250250 // Act
251- result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) . ConfigureAwait ( false ) ;
251+ result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) ;
252252
253253 // Assert
254254 Assert . NotNull ( result ) ;
@@ -270,7 +270,7 @@ public async Task EmptyL1L2Cache_ReturnNullCacheResult_TestAsync()
270270 Assert . Equal ( 0 , _testCacheAdapter . _memoryCache . Count ) ;
271271
272272 // Act
273- byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) . ConfigureAwait ( false ) ;
273+ byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey , telemetryData ) ;
274274
275275 // Assert
276276 Assert . Null ( result ) ;
@@ -293,7 +293,7 @@ public async Task SetL1Cache_ReadL1WithDifferentCacheKey__ReturnNullCacheResult_
293293 Assert . Equal ( 1 , _testCacheAdapter . _memoryCache . Count ) ;
294294
295295 // Act
296- byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) . ConfigureAwait ( false ) ;
296+ byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) ;
297297
298298 // Assert
299299 Assert . Null ( result ) ;
@@ -317,13 +317,13 @@ public async Task SetL1CacheAndL2CacheWithDifferentCache_ReadL1WithCacheKey__Ret
317317 Assert . Single ( L2Cache . _dict ) ;
318318
319319 // Act & Assert
320- byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) . ConfigureAwait ( false ) ;
320+ byte [ ] ? result = await _testCacheAdapter . TestReadCacheBytesAsync ( DefaultCacheKey ) ;
321321 Assert . NotNull ( result ) ;
322322 Assert . Equal ( 9 , result [ 0 ] ) ;
323323 Assert . Equal ( 2 , _testCacheAdapter . _memoryCache . Count ) ;
324324 Assert . Single ( L2Cache . _dict ) ;
325325
326- byte [ ] ? result2 = await _testCacheAdapter . TestReadCacheBytesAsync ( AnotherCacheKey ) . ConfigureAwait ( false ) ;
326+ byte [ ] ? result2 = await _testCacheAdapter . TestReadCacheBytesAsync ( AnotherCacheKey ) ;
327327 Assert . NotNull ( result2 ) ;
328328 Assert . Equal ( 4 , result2 [ 0 ] ) ;
329329 Assert . Equal ( 2 , _testCacheAdapter . _memoryCache . Count ) ;
@@ -343,7 +343,7 @@ public async Task RemoveL1CacheItem_TestAsync()
343343 Assert . Equal ( 1 , _testCacheAdapter . _memoryCache . Count ) ;
344344
345345 // Act
346- await _testCacheAdapter . TestRemoveKeyAsync ( DefaultCacheKey ) . ConfigureAwait ( false ) ;
346+ await _testCacheAdapter . TestRemoveKeyAsync ( DefaultCacheKey ) ;
347347
348348 // Assert
349349 Assert . Equal ( 0 , _testCacheAdapter . _memoryCache . Count ) ;
@@ -362,7 +362,7 @@ public async Task RemoveL2CacheItem_TestAsync()
362362 Assert . Single ( L2Cache . _dict ) ;
363363
364364 // Act
365- await _testCacheAdapter . TestRemoveKeyAsync ( DefaultCacheKey ) . ConfigureAwait ( false ) ;
365+ await _testCacheAdapter . TestRemoveKeyAsync ( DefaultCacheKey ) ;
366366
367367 // Assert
368368 Assert . Equal ( 0 , _testCacheAdapter . _memoryCache . Count ) ;
@@ -382,10 +382,10 @@ public async Task RemoveOneCacheItem_OneCacheItemsRemains_TestAsync()
382382 _testCacheAdapter . _distributedCache . Set ( DefaultCacheKey , cacheL2 ) ;
383383
384384 // Act & Assert
385- await _testCacheAdapter . TestRemoveKeyAsync ( DefaultCacheKey ) . ConfigureAwait ( false ) ;
385+ await _testCacheAdapter . TestRemoveKeyAsync ( DefaultCacheKey ) ;
386386 Assert . Equal ( 1 , _testCacheAdapter . _memoryCache . Count ) ;
387387 Assert . Empty ( L2Cache . _dict ) ;
388- await _testCacheAdapter . TestRemoveKeyAsync ( AnotherCacheKey ) . ConfigureAwait ( false ) ;
388+ await _testCacheAdapter . TestRemoveKeyAsync ( AnotherCacheKey ) ;
389389 Assert . Equal ( 0 , _testCacheAdapter . _memoryCache . Count ) ;
390390 Assert . Empty ( L2Cache . _dict ) ;
391391 }
0 commit comments