diff --git a/seaweed-block/cmd/blockvolume/procedure_store_down_integration_test.go b/seaweed-block/cmd/blockvolume/procedure_store_down_integration_test.go index 80b9e6957d..4b5bf1d310 100644 --- a/seaweed-block/cmd/blockvolume/procedure_store_down_integration_test.go +++ b/seaweed-block/cmd/blockvolume/procedure_store_down_integration_test.go @@ -88,7 +88,7 @@ func storeDownDuringACut(t *testing.T, down string, cowBytes int64, cowWindow bo boundary.id = id boundary.dir = path.Join(env.chunkPath, layout.VolumeDir("v1", id)) cut := []string{"ops", "chunk", "cut", "--volume", "v1", "--status-addr", env.hosts["s1"].status} - verify := []string{"ops", "chunk", "verify", "--volume", "v1", "--chunk-filer", env.cluster.filerGRPC, "--chunk-path", env.chunkPath, "--depth", "data", "--timeout", "5m"} + verify := []string{"ops", "chunk", "verify", "--master", env.h.masterAddr, "--volume", "v1", "--chunk-filer", env.cluster.filerGRPC, "--chunk-path", env.chunkPath, "--depth", "data", "--timeout", "5m"} headGen := func() uint64 { out, _ := env.h.command(t, env.chunkShow()...) hd, err := parseLayoutHead(out) @@ -275,8 +275,15 @@ func storeDownDuringACut(t *testing.T, down string, cowBytes int64, cowWindow bo // The store comes back. env.cluster.restartProc(t, down) backAt := time.Now() - if down == "filer" { - w4WaitTCP(t, env.cluster.filerGRPC, 30*time.Second) + // The store is back when HEAD reads through it again: the filer front + // accepts at once, while the real filer behind it may still be starting. + for end := time.Now().Add(time.Minute); ; time.Sleep(time.Second) { + if _, _, rc := env.h.run(t, env.chunkShow()...); rc == 0 { + break + } + if time.Now().After(end) { + t.Fatalf("%s back: HEAD not readable within 1m of the restart", down) + } } stalled := cutWhileDown if stalled == nil {