diff --git a/test/s3/iam/s3_iam_distributed_test.go b/test/s3/iam/s3_iam_distributed_test.go index 25124b844..58356e042 100644 --- a/test/s3/iam/s3_iam_distributed_test.go +++ b/test/s3/iam/s3_iam_distributed_test.go @@ -103,8 +103,9 @@ func TestS3IAMDistributedTests(t *testing.T) { t.Run("distributed_concurrent_operations", func(t *testing.T) { // Test concurrent operations across distributed instances - const numGoroutines = 10 - const numOperationsPerGoroutine = 5 + // Reduced concurrency (3x2=6 total ops) for CI stability + const numGoroutines = 3 + const numOperationsPerGoroutine = 2 var wg sync.WaitGroup errors := make(chan error, numGoroutines*numOperationsPerGoroutine) @@ -127,6 +128,9 @@ func TestS3IAMDistributedTests(t *testing.T) { if err := framework.CreateBucket(client, bucketName); err != nil { errors <- err continue + + // Small delay to reduce server load + time.Sleep(100 * time.Millisecond) } // Put object @@ -134,18 +138,27 @@ func TestS3IAMDistributedTests(t *testing.T) { if err := framework.PutTestObject(client, bucketName, objectKey, fmt.Sprintf("content-%d-%d", goroutineID, j)); err != nil { errors <- err continue + + // Small delay to reduce server load + time.Sleep(100 * time.Millisecond) } // Get object if _, err := framework.GetTestObject(client, bucketName, objectKey); err != nil { errors <- err continue + + // Small delay to reduce server load + time.Sleep(100 * time.Millisecond) } // Delete object if err := framework.DeleteTestObject(client, bucketName, objectKey); err != nil { errors <- err continue + + // Small delay to reduce server load + time.Sleep(100 * time.Millisecond) } // Delete bucket @@ -154,6 +167,9 @@ func TestS3IAMDistributedTests(t *testing.T) { }); err != nil { errors <- err continue + + // Small delay to reduce server load + time.Sleep(100 * time.Millisecond) } } }(i)