Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Remove SetMaster Query Expectation from ERS Test #6617

Merged
merged 2 commits into from
Aug 24, 2020
Merged
Changes from 1 commit
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
13 changes: 0 additions & 13 deletions go/vt/wrangler/testlib/emergency_reparent_shard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,27 +171,14 @@ func TestEmergencyReparentShard(t *testing.T) {
waitReplicaTimeout := time.Second * 2
err := vp.Run([]string{"EmergencyReparentShard", "-wait_replicas_timeout", waitReplicaTimeout.String(), newMaster.Tablet.Keyspace + "/" + newMaster.Tablet.Shard,
topoproto.TabletAliasString(newMaster.Tablet.Alias)})
buffer := 100 * time.Millisecond
time.Sleep(waitReplicaTimeout + buffer)
require.NoError(t, err)
// check what was run
err = newMaster.FakeMysqlDaemon.CheckSuperQueryList()
require.NoError(t, err)
err = oldMaster.FakeMysqlDaemon.CheckSuperQueryList()
require.NoError(t, err)
err = goodReplica1.FakeMysqlDaemon.CheckSuperQueryList()
require.NoError(t, err)
err = goodReplica2.FakeMysqlDaemon.CheckSuperQueryList()
require.NoError(t, err)

assert.False(t, newMaster.FakeMysqlDaemon.ReadOnly, "newMaster.FakeMysqlDaemon.ReadOnly set")
// old master read-only flag doesn't matter, it is scrapped
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment isn't valid any more, let us remove it too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

assert.True(t, goodReplica1.FakeMysqlDaemon.ReadOnly, "goodReplica1.FakeMysqlDaemon.ReadOnly not set")
assert.True(t, goodReplica2.FakeMysqlDaemon.ReadOnly, "goodReplica2.FakeMysqlDaemon.ReadOnly not set")
assert.True(t, goodReplica1.FakeMysqlDaemon.Replicating, "goodReplica1.FakeMysqlDaemon.Replicating not set")
assert.False(t, goodReplica2.FakeMysqlDaemon.Replicating, "goodReplica2.FakeMysqlDaemon.Replicating set")
checkSemiSyncEnabled(t, true, true, newMaster)
checkSemiSyncEnabled(t, false, true, goodReplica1, goodReplica2)
}

// TestEmergencyReparentShardMasterElectNotBest tries to emergency reparent
Expand Down