test: apply stage geometry to the cut memory arm

This commit is contained in:
pingqiu committed 2026-11-19 20:16:34 -08:00
1 parent a7b50b4601
commit 42e2c872cd
1 file changed
+5 -1
@@ -242,7 +242,11 @@ func TestWALStoreChunk_InitialWriteAnonymousMemory(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
defer cancel()
r := &memoryDiskRemote{MemChunkRemote: storage.NewMemChunkRemote(), dir: t.TempDir(), hashes: make(map[string][32]byte)}
p, err := durable.NewDurableProvider(durable.ProviderConfig{Impl: durable.ImplWALStoreChunk, StorageRoot: t.TempDir(), BlockSize: 4096, NumBlocks: 1 << 18, ChunkBlocks: 1024, ChunkCaptureInterval: 0, ChunkRemoteFor: func(string) (storage.ChunkRemote, error) { return r, nil }}, v1View())
cfg := durable.ProviderConfig{Impl: durable.ImplWALStoreChunk, StorageRoot: t.TempDir(), BlockSize: 4096, NumBlocks: 1 << 18, ChunkBlocks: 1024, ChunkCaptureInterval: 0, ChunkRemoteFor: func(string) (storage.ChunkRemote, error) { return r, nil }}
if os.Getenv("SWBLOCK_MEMORY_STAGE") != "" {
cfg.ChunkDirtyThreshold = 64
}
p, err := durable.NewDurableProvider(cfg, v1View())
if err != nil {
t.Fatal(err)
}