diff options
| author | chrislu <chris.lu@gmail.com> | 2025-10-26 19:13:33 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-10-26 19:13:33 -0700 |
| commit | 2bcf65741f15f786e0cc95346fd2e0ab031f1156 (patch) | |
| tree | 618a17cb4acc5111bfb83a6599b6740825f400f2 | |
| parent | 46ce3b98311aeb0ba433b32cc983303e059d4196 (diff) | |
| download | seaweedfs-2bcf65741f15f786e0cc95346fd2e0ab031f1156.tar.xz seaweedfs-2bcf65741f15f786e0cc95346fd2e0ab031f1156.zip | |
10GB sparse files can be slow or fail on non-sparse FS. Use 10MB to hit SmallBlockSize math (1MB shards) deterministically.
| -rw-r--r-- | weed/storage/disk_location_ec_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/storage/disk_location_ec_test.go b/weed/storage/disk_location_ec_test.go index fad1612fa..e0e34cee4 100644 --- a/weed/storage/disk_location_ec_test.go +++ b/weed/storage/disk_location_ec_test.go @@ -114,8 +114,8 @@ func TestIncompleteEcEncodingCleanup(t *testing.T) { // Setup test files baseFileName := erasure_coding.EcShardFileName(tt.collection, tempDir, int(tt.volumeId)) - // Use deterministic sizes that match EC encoding - datFileSize := int64(10 * 1024 * 1024 * 1024) // 10GB + // Use deterministic but small size: 10MB .dat => 1MB per shard + datFileSize := int64(10 * 1024 * 1024) // 10MB expectedShardSize := calculateExpectedShardSize(datFileSize) // Create .dat file if needed @@ -294,9 +294,9 @@ func TestValidateEcVolume(t *testing.T) { // For proper testing, we need to use realistic sizes that match EC encoding // EC uses large blocks (1GB) and small blocks (1MB) - // For test purposes, use a .dat file size that results in expected shard sizes - // 10GB .dat file = 1GB per shard (1 large block) - datFileSize := int64(10 * 1024 * 1024 * 1024) // 10GB + // For test purposes, use a small .dat file size that still exercises the logic + // 10MB .dat file = 1MB per shard (one small batch, fast and deterministic) + datFileSize := int64(10 * 1024 * 1024) // 10MB expectedShardSize := calculateExpectedShardSize(datFileSize) // Create .dat file if needed |
