@@ -14,7 +14,7 @@ namespace Ramstack.FileSystem.Amazon;
1414[ Category ( "Cloud:Amazon" ) ]
1515public class WritableAmazonFileSystemTests : VirtualFileSystemSpecificationTests
1616{
17- private readonly HashSet < string > _list = [ ] ;
17+ private readonly HashSet < string > _buckets = [ ] ;
1818 private readonly TempFileStorage _storage = new TempFileStorage ( ) ;
1919
2020 [ OneTimeSetUp ]
@@ -35,17 +35,17 @@ public async Task Cleanup()
3535 {
3636 _storage . Dispose ( ) ;
3737
38- foreach ( var name in _list . ToArray ( ) )
38+ foreach ( var name in _buckets . ToArray ( ) )
3939 {
4040 using var fs = CreateFileSystem ( name ) ;
4141
4242 try
4343 {
4444 await fs . DeleteDirectoryAsync ( "/" ) ;
4545 }
46- catch ( Exception exception )
46+ catch ( Exception e )
4747 {
48- Console . WriteLine ( exception ) ;
48+ Console . WriteLine ( e ) ;
4949 }
5050 }
5151 }
@@ -61,14 +61,15 @@ public async Task File_OpenWrite_InternalBufferWriteError_DoesNotCreateFile()
6161 Assert . That ( underlying , Is . Not . Null ) ;
6262
6363 // Write enough data to trigger automatic part upload (>= 5 MiB).
64- await stream . WriteAsync ( new ReadOnlyMemory < byte > ( new byte [ 6 * 1024 * 1024 ] ) ) ;
64+ await stream . WriteAsync ( new byte [ 6 * 1024 * 1024 ] ) ;
6565
6666 // Simulates an internal buffer write error.
6767 await underlying . DisposeAsync ( ) ;
6868
6969 try
7070 {
71- await stream . WriteAsync ( new ReadOnlyMemory < byte > ( new byte [ 1024 ] ) ) ;
71+ await stream . WriteAsync ( new byte [ 1024 ] ) ;
72+ Assert . Fail ( ) ;
7273 }
7374 catch
7475 {
@@ -239,7 +240,6 @@ public async Task File_OpenWrite_FlushWithMultipartUpload()
239240 for ( var i = 0 ; i < Count ; i ++ )
240241 await stream . WriteAsync ( chunk ) ;
241242 }
242-
243243 {
244244 var file = fs . GetFile ( FileName ) ;
245245
@@ -314,7 +314,7 @@ protected override DirectoryInfo GetDirectoryInfo() =>
314314
315315 private AmazonS3FileSystem CreateFileSystem ( string storageName )
316316 {
317- _list . Add ( storageName ) ;
317+ _buckets . Add ( storageName ) ;
318318
319319 return new AmazonS3FileSystem (
320320 new BasicAWSCredentials ( "rustfsadmin" , "rustfsadmin" ) ,
0 commit comments