Commit 3ce36470 authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV#6399 - Make galera test suite run with --parallel

Galera tests used default base/SST ports which led to
failures due to port conflicts when run in parallel.
Fixed by setting them to ones generated by mtr framework.
parent d2cd778a
...@@ -238,6 +238,9 @@ my @mysqld_rules= ...@@ -238,6 +238,9 @@ my @mysqld_rules=
{ 'pid-file' => \&fix_pidfile }, { 'pid-file' => \&fix_pidfile },
{ '#host' => \&fix_host }, { '#host' => \&fix_host },
{ 'port' => \&fix_port }, { 'port' => \&fix_port },
# galera base_port and port used during SST
{ '#galera_port' => \&fix_port },
{ '#sst_port' => \&fix_port },
{ 'socket' => \&fix_socket }, { 'socket' => \&fix_socket },
{ '#log-error' => \&fix_log_error }, { '#log-error' => \&fix_log_error },
{ 'general-log' => 1 }, { 'general-log' => 1 },
......
...@@ -4859,6 +4859,7 @@ sub extract_warning_lines ($$) { ...@@ -4859,6 +4859,7 @@ sub extract_warning_lines ($$) {
# Galera-related warnings. # Galera-related warnings.
qr|WSREP:.*down context.*|, qr|WSREP:.*down context.*|,
qr|WSREP: Failed to send state UUID:.*|, qr|WSREP: Failed to send state UUID:.*|,
qr|WSREP: wsrep_sst_receive_address.*|,
); );
my $matched_lines= []; my $matched_lines= [];
......
...@@ -5,12 +5,15 @@ ...@@ -5,12 +5,15 @@
binlog-format=row binlog-format=row
wsrep_provider=@ENV.WSREP_PROVIDER wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://' wsrep_cluster_address='gcomm://'
wsrep_provider_options='base_port=@mysqld.1.#galera_port'
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
[mysqld.2] [mysqld.2]
binlog-format=row binlog-format=row
wsrep_provider=@ENV.WSREP_PROVIDER wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://127.0.0.1:4567' wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='gmcast.listen_addr=tcp://127.0.0.1:4568' wsrep_provider_options='base_port=@mysqld.2.#galera_port'
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
[ENV] [ENV]
NODE_MYPORT_1= @mysqld.1.port NODE_MYPORT_1= @mysqld.1.port
......
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
[mysqld.1]
[ENV]
GALERA_BASE_PORT=@mysqld.1.#galera_port
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --log-bin --binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_provider_options='base_port=$GALERA_BASE_PORT' --wsrep-on=1 --log-bin
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads --binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_provider_options='base_port=$GALERA_BASE_PORT' --thread_handling=pool-of-threads
--source include/have_wsrep.inc --source include/have_wsrep.inc
# Set galera's base_port so that test can run in parallel with other galera
# tests.
--disable_query_log
eval SET GLOBAL wsrep_provider_options='base_port=$GALERA_BASE_PORT';
--enable_query_log
--echo --echo
--echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query --echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query
--echo # --echo #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment