mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-08 15:41:15 +02:00
test: write more files than the master grows volumes at a time (#11131)
The cached-location test needs two files on one volume, but it wrote six files into the six volumes a 001 layout starts with, and every so often each file landed on its own volume and the test had nothing to probe. Seven files leave no way to spread them out. Claude-Session: https://claude.ai/code/session_011NYXuzGttwrTMsfLYvmQFs
This commit is contained in:
@@ -215,10 +215,12 @@ func TestReadAfterCachedLocationDies(t *testing.T) {
|
||||
c := startFailoverCluster(t, 3, 2)
|
||||
|
||||
// Small files so each is a single chunk on a single volume, which keeps the
|
||||
// mapping from file to server unambiguous.
|
||||
// mapping from file to server unambiguous. The master grows six 001 volumes
|
||||
// at a time, so seven files put two of them on one volume however the
|
||||
// writes are spread.
|
||||
const fileSize = 256 << 10
|
||||
payloads := make(map[string][]byte)
|
||||
for i := 0; i < 6; i++ {
|
||||
for i := 0; i < 7; i++ {
|
||||
name := fmt.Sprintf("smallfile-%d", i)
|
||||
data := make([]byte, fileSize)
|
||||
_, err := rand.Read(data)
|
||||
|
||||
Reference in New Issue
Block a user