From e61620e95331c81f0b8832a427d6af3c7852820f Mon Sep 17 00:00:00 2001 From: Ersan Bozduman Date: Thu, 12 Oct 2023 09:12:23 -0700 Subject: [PATCH] wait for notifications --- Minio.Functional.Tests/FunctionalTest.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Minio.Functional.Tests/FunctionalTest.cs b/Minio.Functional.Tests/FunctionalTest.cs index 812962053..70a7eedd0 100644 --- a/Minio.Functional.Tests/FunctionalTest.cs +++ b/Minio.Functional.Tests/FunctionalTest.cs @@ -632,7 +632,7 @@ internal static async Task TearDown(IMinioClient minio, string bucketName) exceptionList.Add, () => { }); - await Task.Delay(4500).ConfigureAwait(false); + await Task.Delay(9000).ConfigureAwait(false); if (lockConfig?.ObjectLockEnabled.Equals(ObjectLockConfiguration.LockEnabled, StringComparison.OrdinalIgnoreCase) == true) { @@ -2701,7 +2701,7 @@ internal static async Task ListenBucketNotificationsAsync_Test1(IMinioClient min Exception ex = new UnexpectedMinioException(err.Message); if (string.Equals(err.Code, "NotImplemented", StringComparison.OrdinalIgnoreCase)) ex = new NotImplementedException(err.Message); - + await TearDown(minio, bucketName).ConfigureAwait(false); throw ex; } @@ -2730,6 +2730,7 @@ internal static async Task ListenBucketNotificationsAsync_Test1(IMinioClient min listenBucketNotificationsSignature, "Tests whether ListenBucketNotifications passes for small object", TestStatus.PASS, DateTime.Now - startTime, args: args).Log(); + await TearDown(minio, bucketName).ConfigureAwait(false); } catch (NotImplementedException ex) { @@ -2738,6 +2739,7 @@ internal static async Task ListenBucketNotificationsAsync_Test1(IMinioClient min "Tests whether ListenBucketNotifications passes for small object", TestStatus.NA, DateTime.Now - startTime, ex.Message, ex.ToString(), args: args).Log(); + await TearDown(minio, bucketName).ConfigureAwait(false); } catch (Exception ex) { @@ -2769,13 +2771,10 @@ static bool isAWS(string endPoint) "Tests whether ListenBucketNotifications passes for small object", TestStatus.FAIL, DateTime.Now - startTime, ex.Message, ex.ToString(), args: args).Log(); + await TearDown(minio, bucketName).ConfigureAwait(false); throw; } } - finally - { - await TearDown(minio, bucketName).ConfigureAwait(false); - } } internal static async Task ListenBucketNotificationsAsync_Test2(IMinioClient minio) @@ -5388,7 +5387,7 @@ internal static async Task ListObjects_Test(IMinioClient minio, string bucketNam () => { }); } - await Task.Delay(5000).ConfigureAwait(false); + await Task.Delay(20000).ConfigureAwait(false); Assert.AreEqual(numObjects, count); } @@ -6045,7 +6044,7 @@ internal static async Task BucketLifecycleAsync_Test1(IMinioClient minio) catch (Exception ex) { await TearDown(minio, bucketName).ConfigureAwait(false); - new MintLogger(nameof(BucketLifecycleAsync_Test1), setBucketLifecycleSignature, + new MintLogger(nameof(BucketLifecycleAsync_Test1) + ".0", setBucketLifecycleSignature, "Tests whether SetBucketLifecycleAsync passes", TestStatus.FAIL, DateTime.Now - startTime, ex.Message, ex.ToString(), args: args).Log(); throw;