polardbxengine/mysql-test/suite/group_replication/t/gr_start_replication_auto.test

44 lines
2.0 KiB
Plaintext

################################################################################
# WL#7660 - GCS PLUGIN IMPLEMENTATION
#
# This test checks the basic functionality of Group Replication
# plugin which should work with the .opt file in which the plugin
# options are passed as options.
#
# Test:
# 0. The test requires one server. Set group name on .opt file.
# 1. Check group_replication_group_name variable.
# 2. Restart M1 with group_replication_start_on_boot=ON.
# 3. Try executing START GR command. It should error out stating GR is already
# running.
# 4. Check that the member information is correct in the P_S table.
################################################################################
--source include/have_group_replication_plugin.inc
--source include/force_restart.inc
SELECT @@group_replication_group_name;
# We need to restart server to simulate start_on_boot option since
# on MTR it is impossible to compute ports on configuration files.
--let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address`
--let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds`
--let $restart_parameters=restart:--group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_bootstrap_group=1 --group_replication_start_on_boot=1
--replace_result $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS
--source include/restart_mysqld.inc
SELECT @@group_replication_group_name;
SELECT @@group_replication_start_on_boot;
--error ER_GROUP_REPLICATION_RUNNING
START GROUP_REPLICATION;
#Check if the member information is correct on the table
--let $server_uuid= `SELECT @@GLOBAL.SERVER_UUID`
--let $wait_condition= SELECT count(*)=1 FROM performance_schema.replication_group_members WHERE member_id= '$server_uuid' ;
--source include/wait_condition.inc
--source include/stop_group_replication.inc