|
@ -103,8 +103,9 @@ func TestS3IAMDistributedTests(t *testing.T) { |
|
|
|
|
|
|
|
|
t.Run("distributed_concurrent_operations", func(t *testing.T) { |
|
|
t.Run("distributed_concurrent_operations", func(t *testing.T) { |
|
|
// Test concurrent operations across distributed instances
|
|
|
// 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 |
|
|
var wg sync.WaitGroup |
|
|
errors := make(chan error, numGoroutines*numOperationsPerGoroutine) |
|
|
errors := make(chan error, numGoroutines*numOperationsPerGoroutine) |
|
@ -127,6 +128,9 @@ func TestS3IAMDistributedTests(t *testing.T) { |
|
|
if err := framework.CreateBucket(client, bucketName); err != nil { |
|
|
if err := framework.CreateBucket(client, bucketName); err != nil { |
|
|
errors <- err |
|
|
errors <- err |
|
|
continue |
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
// Small delay to reduce server load
|
|
|
|
|
|
time.Sleep(100 * time.Millisecond) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Put object
|
|
|
// 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 { |
|
|
if err := framework.PutTestObject(client, bucketName, objectKey, fmt.Sprintf("content-%d-%d", goroutineID, j)); err != nil { |
|
|
errors <- err |
|
|
errors <- err |
|
|
continue |
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
// Small delay to reduce server load
|
|
|
|
|
|
time.Sleep(100 * time.Millisecond) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Get object
|
|
|
// Get object
|
|
|
if _, err := framework.GetTestObject(client, bucketName, objectKey); err != nil { |
|
|
if _, err := framework.GetTestObject(client, bucketName, objectKey); err != nil { |
|
|
errors <- err |
|
|
errors <- err |
|
|
continue |
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
// Small delay to reduce server load
|
|
|
|
|
|
time.Sleep(100 * time.Millisecond) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Delete object
|
|
|
// Delete object
|
|
|
if err := framework.DeleteTestObject(client, bucketName, objectKey); err != nil { |
|
|
if err := framework.DeleteTestObject(client, bucketName, objectKey); err != nil { |
|
|
errors <- err |
|
|
errors <- err |
|
|
continue |
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
// Small delay to reduce server load
|
|
|
|
|
|
time.Sleep(100 * time.Millisecond) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Delete bucket
|
|
|
// Delete bucket
|
|
@ -154,6 +167,9 @@ func TestS3IAMDistributedTests(t *testing.T) { |
|
|
}); err != nil { |
|
|
}); err != nil { |
|
|
errors <- err |
|
|
errors <- err |
|
|
continue |
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
// Small delay to reduce server load
|
|
|
|
|
|
time.Sleep(100 * time.Millisecond) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}(i) |
|
|
}(i) |
|
|