Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions go/test/endtoend/vtorc/general/vtorc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"vitess.io/vitess/go/test/endtoend/vtorc/utils"
"vitess.io/vitess/go/vt/log"
topodatapb "vitess.io/vitess/go/vt/proto/topodata"
vtorcdatapb "vitess.io/vitess/go/vt/proto/vtorcdata"
vtutils "vitess.io/vitess/go/vt/utils"
"vitess.io/vitess/go/vt/vtorc/inst"
"vitess.io/vitess/go/vt/vtorc/logic"
)

Expand Down Expand Up @@ -317,7 +317,7 @@ func TestVTOrcRepairs(t *testing.T) {

// Wait for problems to be set.
utils.WaitForDetectedProblems(t, vtOrcProcess,
string(inst.PrimaryIsReadOnly),
vtorcdatapb.AnalysisType_PrimaryIsReadOnly,
curPrimary.Alias,
keyspace.Name,
shard0.Name,
Expand All @@ -331,7 +331,7 @@ func TestVTOrcRepairs(t *testing.T) {

// wait for detected problem to be cleared.
utils.WaitForDetectedProblems(t, vtOrcProcess,
string(inst.PrimaryIsReadOnly),
vtorcdatapb.AnalysisType_PrimaryIsReadOnly,
curPrimary.Alias,
keyspace.Name,
shard0.Name,
Expand Down
6 changes: 4 additions & 2 deletions go/test/endtoend/vtorc/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ import (
"vitess.io/vitess/go/test/endtoend/cluster"
"vitess.io/vitess/go/vt/log"
topodatapb "vitess.io/vitess/go/vt/proto/topodata"
vtorcdatapb "vitess.io/vitess/go/vt/proto/vtorcdata"
"vitess.io/vitess/go/vt/topo"
"vitess.io/vitess/go/vt/topo/topoproto"
"vitess.io/vitess/go/vt/utils"
"vitess.io/vitess/go/vt/vtctl/reparentutil/policy"
"vitess.io/vitess/go/vt/vtorc/inst"

// Register topo implementations.
_ "vitess.io/vitess/go/vt/topo/consultopo"
Expand Down Expand Up @@ -1080,9 +1082,9 @@ func GetIntFromValue(val any) int {
}

// WaitForDetectedProblems waits until the given analysis code, alias, keyspace and shard count matches the count expected.
func WaitForDetectedProblems(t *testing.T, vtorcInstance *cluster.VTOrcProcess, code, alias, ks, shard string, expect int) {
func WaitForDetectedProblems(t *testing.T, vtorcInstance *cluster.VTOrcProcess, analysisType vtorcdatapb.AnalysisType, alias, ks, shard string, expect int) {
t.Helper()
key := strings.Join([]string{code, alias, ks, shard}, ".")
key := strings.Join([]string{inst.AnalysisTypeProtoToString(analysisType), alias, ks, shard}, ".")
timeout := 15 * time.Second
startTime := time.Now()

Expand Down
Loading
Loading