Files
seaweedfs/seaweed-block/core/replication/component/matrix.go
T
pingqiuandClaude Opus 5.5 68045d9698 durable: remove the smartwal and parallel-walstore engines
- The provider refuses the removed names and, under every selector and
  before any selector comparison, a volume carrying their magic (SWAW;
  SWPW in either header slot), reading the file read-only and never
  modifying it. blockvolume --durable-impl and the launcher refuse the
  names with the same advice; the chart schema allows walstore only.
- core/storage/smartwal, core/storage/parallelwal and
  cmd/sw-block-testutil (whose one command corrupted smartwal records)
  are deleted, with the helm smartwal-corruption scenario and the
  parallel-walstore gate script.
- The replication harness runs on walstore; tests that ran on a removed
  engine only because a stub needed some store move to walstore, and the
  state_convergence label test moves to the in-memory BlockStore.
- sw-block cluster.check drops the removed engines' cases.
- Ledger: INV-OPEN-REMOVED-ENGINE-REFUSED-001 and
  INV-OPEN-REMOVED-ENGINE-NAME-REFUSED-001, an OpenRefused edge in M1, and
  the rows citing the removed tests updated. Docs: block-design 1.3 now
  describes the removal, the smartwal deep-dive and figure are gone, the
  scripts default to walstore, and the v1.1 notes carry the removal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:38:54 -08:00

37 lines
1.1 KiB
Go

package component
import "testing"
// RunMatrix runs the given scenario against each gating on-disk substrate
// factory (walstore, the one durable engine).
//
// Authoring shape:
//
// component.RunMatrix(t, func(t *testing.T, c *component.Cluster) {
// c.WithReplicas(1).Start()
// c.PrimaryWriteN(20)
// c.PrimarySync()
// c.CatchUpReplica(0)
// c.AssertReplicaConverged(0)
// })
//
// The cluster is fresh per substrate row; t.Cleanup handles
// teardown automatically.
func RunMatrix(t *testing.T, scenario func(t *testing.T, c *Cluster)) {
t.Helper()
t.Run("walstore", func(t *testing.T) {
scenario(t, NewCluster(t, Walstore))
})
}
// RunSubstrate runs the scenario against one named substrate. Useful
// when a scenario only makes sense against a specific substrate
// (e.g., a wal_replay-specific behavior pin) — most scenarios
// should use RunMatrix instead.
func RunSubstrate(t *testing.T, name string, factory SubstrateFactory, scenario func(t *testing.T, c *Cluster)) {
t.Helper()
t.Run(name, func(t *testing.T) {
scenario(t, NewCluster(t, factory))
})
}