mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-26 06:50:45 +01:00
math/rand/v2
This commit is contained in:
1 parent
5b34eea26c
commit
102a081dd9
15 files changed
+42
-37
No files matched your search
@@ -91,7 +91,7 @@ func waitForS3Service(t *testing.T, client *s3.Client, timeout time.Duration) {
|
||||
func getNewBucketName() string {
|
||||
timestamp := time.Now().UnixNano()
|
||||
// Add random suffix to prevent collisions when tests run quickly
|
||||
randomSuffix := mathrand.Intn(100000)
|
||||
randomSuffix := mathrand.IntN(100000)
|
||||
return fmt.Sprintf("%s%d-%d", defaultConfig.BucketPrefix, timestamp, randomSuffix)
|
||||
}
|
||||
|
||||
|
||||
@@ -656,7 +656,7 @@ func (f *S3IAMTestFramework) GenerateUniqueBucketName(prefix string) string {
|
||||
testName = strings.ReplaceAll(testName, "_", "-")
|
||||
|
||||
// Add random suffix to handle parallel tests
|
||||
randomSuffix := mathrand.Intn(10000)
|
||||
randomSuffix := mathrand.IntN(10000)
|
||||
|
||||
return fmt.Sprintf("%s-%s-%d", prefix, testName, randomSuffix)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user