address comments

This commit is contained in:
chrislu
2025-08-25 23:01:18 -07:00
parent 7d7da35179
commit 02798df85d
4 changed files with 46 additions and 35 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ All S3 gateway instances share the same IAM state through the filer.
"sts": {
"tokenDuration": 3600000000000,
"maxSessionLength": 43200000000000,
"issuer": "seaweedfs-sts",
"issuer": "seaweedfs-sts",
"signingKey": "base64-encoded-signing-key",
"sessionStoreType": "filer",
"sessionStoreConfig": {
@@ -64,7 +64,7 @@ All S3 gateway instances share the same IAM state through the filer.
"roleStore": {
"storeType": "filer",
"storeConfig": {
"filerAddress": "localhost:8888",
"filerAddress": "localhost:8888",
"basePath": "/seaweedfs/iam/roles"
}
}
+9 -14
View File
@@ -128,38 +128,34 @@ 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
objectKey := "test-object.txt"
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
if _, err := client.DeleteBucket(&s3.DeleteBucketInput{
@@ -167,10 +163,9 @@ func TestS3IAMDistributedTests(t *testing.T) {
}); err != nil {
errors <- err
continue
}
// Small delay to reduce server load
time.Sleep(100 * time.Millisecond)
}
}
}(i)
}
@@ -183,15 +178,15 @@ func TestS3IAMDistributedTests(t *testing.T) {
for err := range errors {
errorList = append(errorList, err)
}
totalOperations := numGoroutines * numOperationsPerGoroutine
errorRate := float64(len(errorList)) / float64(totalOperations)
if len(errorList) > 0 {
t.Logf("Concurrent operations: %d/%d operations failed (%.1f%% error rate). First error: %v",
t.Logf("Concurrent operations: %d/%d operations failed (%.1f%% error rate). First error: %v",
len(errorList), totalOperations, errorRate*100, errorList[0])
}
// Allow up to 50% error rate for concurrent stress testing
// This tests that the system handles concurrent load gracefully
if errorRate > 0.5 {