File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/MongoDB.Driver.GridFS
tests/MongoDB.Driver.GridFS.Tests Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -100,12 +100,13 @@ public override void Close(CancellationToken cancellationToken)
100
100
101
101
public override void Flush ( )
102
102
{
103
- throw new NotSupportedException ( ) ;
103
+ // CSHARP-4377: Flush on read-only stream should be a NOP
104
104
}
105
105
106
106
public override Task FlushAsync ( CancellationToken cancellationToken )
107
107
{
108
- throw new NotSupportedException ( ) ;
108
+ // CSHARP-4377: Flush on read-only stream should be a NOP
109
+ return Task . CompletedTask ;
109
110
}
110
111
111
112
public override void SetLength ( long value )
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ public void FileInfo_should_return_expected_result()
220
220
221
221
[ Theory ]
222
222
[ ParameterAttributeData ]
223
- public void Flush_should_throw (
223
+ public void Flush_should_not_throw (
224
224
[ Values ( false , true ) ] bool async)
225
225
{
226
226
var bucket = CreateBucket( 128 ) ;
@@ -238,7 +238,7 @@ public void Flush_should_throw(
238
238
action = ( ) => subject . Flush ( ) ;
239
239
}
240
240
241
- action . ShouldThrow < NotSupportedException > ( ) ;
241
+ action . ShouldNotThrow < NotSupportedException > ( ) ;
242
242
}
243
243
244
244
[ Fact ]
You can’t perform that action at this time.
0 commit comments