Skip to content

Commit

Permalink
Addresses ignored func test case exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ersan Bozduman committed Aug 8, 2024
1 parent 8b31ca9 commit 6de3c2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Minio.Functional.Tests/FunctionalTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -594,17 +594,17 @@ internal static async Task TearDown(IMinioClient minio, string bucketName)
{
var beArgs = new BucketExistsArgs()
.WithBucket(bucketName);
var bktExists = await minio.BucketExistsAsync(beArgs).ConfigureAwait(false);
if (!bktExists)
return;
var getVersions = false;
// Get Versioning/Retention Info.
var lockConfigurationArgs =
new GetObjectLockConfigurationArgs()
.WithBucket(bucketName);
ObjectLockConfiguration lockConfig = null;
var lockConfig = new ObjectLockConfiguration();
try
{
var bktExists = await minio.BucketExistsAsync(beArgs).ConfigureAwait(false);
if (!bktExists)
return;
// Get Versioning/Retention Info.
var lockConfigurationArgs =
new GetObjectLockConfigurationArgs()
.WithBucket(bucketName);
var versioningConfig = await minio.GetVersioningAsync(new GetVersioningArgs()
.WithBucket(bucketName)
.WithVersions(true)).ConfigureAwait(false);
Expand Down
3 changes: 3 additions & 0 deletions Minio/RequestExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ await requestMessageBuilder.ResponseWriter(responseResult.ContentStream, cancell
{
if (ex.Message.Equals("ThrowBucketNotFoundException", StringComparison.Ordinal))
throw new BucketNotFoundException();

if (responseResult is not null) responseResult.Exception = ex;
else return new ResponseResult(request, ex);
throw;
}
}
Expand Down

0 comments on commit 6de3c2a

Please sign in to comment.