зеркало из https://github.com/github/vitess-gh.git
Fixing integration tests to not expect QS running when it shouldn't be.
Also fixing the test so the reparent commands actually work. It's needed now that we expect the tablet to become healthy.
This commit is contained in:
Родитель
23aa65d5f7
Коммит
7d403bbc30
|
@ -105,7 +105,7 @@ class GoogleMysql(MysqlFlavor):
|
|||
"SET binlog_group_id = %s, master_server_id = %s" %
|
||||
(group_id, server_id),
|
||||
"CHANGE MASTER TO "
|
||||
"MASTER_HOST='%s', MASTER_PORT=%u, CONNECT_USING_GROUP_ID" %
|
||||
"MASTER_HOST='%s', MASTER_PORT=%u, MASTER_USER='vt_repl', CONNECT_USING_GROUP_ID" %
|
||||
(host, port)]
|
||||
|
||||
|
||||
|
@ -148,7 +148,7 @@ class MariaDB(MysqlFlavor):
|
|||
return [
|
||||
"SET GLOBAL gtid_slave_pos = '%s'" % pos["MariaDB"],
|
||||
"CHANGE MASTER TO "
|
||||
"MASTER_HOST='%s', MASTER_PORT=%u, MASTER_USE_GTID = slave_pos" %
|
||||
"MASTER_HOST='%s', MASTER_PORT=%u, MASTER_USER='vt_repl', MASTER_USE_GTID = slave_pos" %
|
||||
(host, port)]
|
||||
|
||||
def enable_binlog_checksum(self, tablet):
|
||||
|
|
|
@ -511,18 +511,25 @@ class TestTabletManager(unittest.TestCase):
|
|||
]
|
||||
utils.wait_procs(start_procs)
|
||||
|
||||
# wait for the tablets to become healthy and fix their mysql port
|
||||
for t in tablet_62344, tablet_62044:
|
||||
t.wait_for_vttablet_state('SERVING')
|
||||
|
||||
# we need to do one more health check here, so it sees the query service
|
||||
# is now running, and turns green.
|
||||
utils.run_vtctl(['RunHealthCheck', t.tablet_alias, 'replica'],
|
||||
# the master should still be healthy
|
||||
utils.run_vtctl(['RunHealthCheck', tablet_62344.tablet_alias, 'replica'],
|
||||
auto_log=True)
|
||||
|
||||
# master will be healthy, slave's replication won't be running
|
||||
self.check_healthz(tablet_62344, True)
|
||||
|
||||
# the slave won't be healthy at first, as replication is not running
|
||||
utils.run_vtctl(['RunHealthCheck', tablet_62044.tablet_alias, 'replica'],
|
||||
auto_log=True)
|
||||
self.check_healthz(tablet_62044, False)
|
||||
tablet_62044.wait_for_vttablet_state('NOT_SERVING')
|
||||
|
||||
# restart replication
|
||||
tablet_62044.mquery('', ['START SLAVE'])
|
||||
|
||||
# wait for the tablet to become healthy and fix its mysql port
|
||||
utils.run_vtctl(['RunHealthCheck', tablet_62044.tablet_alias, 'replica'],
|
||||
auto_log=True)
|
||||
tablet_62044.wait_for_vttablet_state('SERVING')
|
||||
self.check_healthz(tablet_62044, True)
|
||||
|
||||
for t in tablet_62344, tablet_62044:
|
||||
# wait for mysql port to show up
|
||||
|
|
Загрузка…
Ссылка в новой задаче