Skip to content

Commit

Permalink
test: poll the new gauge in the test
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <manan@planetscale.com>
  • Loading branch information
GuptaManan100 committed Feb 17, 2025
1 parent 4725dd9 commit a8d2cbd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion go/test/endtoend/reparent/newfeaturetest/reparent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func TestSemiSyncBlockDueToDisruption(t *testing.T) {
ch := make(chan any)
go func() {
defer func() {
ch <- true
close(ch)
}()
utils.ConfirmReplication(t, tablets[0], []*cluster.Vttablet{tablets[1], tablets[2], tablets[3]})
}()
Expand All @@ -289,6 +289,19 @@ func TestSemiSyncBlockDueToDisruption(t *testing.T) {
// on the replica's before the disruption has been introduced.
err := clusterInstance.StartVTOrc(clusterInstance.Keyspaces[0].Name)
require.NoError(t, err)
go func() {
for {
select {
case <-ch:
return
case <-time.After(1 * time.Second):
str, isPresent := tablets[0].VttabletProcess.GetVars()["SemiSyncMonitorWritesBlocked"]
if isPresent {
log.Errorf("SemiSyncMonitorWritesBlocked - %v", str)
}
}
}
}()
// If the network disruption is too long lived, then we will end up running ERS from VTOrc.
networkDisruptionDuration := 43 * time.Second
time.Sleep(networkDisruptionDuration)
Expand Down

0 comments on commit a8d2cbd

Please sign in to comment.