Bug #80872 replication tests can't be run with ./mtr --repeat=2 (or more)
Submitted: 29 Mar 2016 1:00 Modified: 29 Mar 2016 4:13
Reporter: Daniel Black Email Updates:
Status: Verified Impact on me:
None 
Category:Tests: Replication Severity:S3 (Non-critical)
Version:5.7.9,5.7.11 OS:Any
Assigned to: CPU Architecture:Any

[29 Mar 2016 1:00] Daniel Black
Description:
[danielgb@blade4a mysql-server-build]$ (cd mysql-test; ./mtr --repeat=2 rpl.rpl_replication_observers_example_plugin_server_startup )
Logging: /home/danielgb/mysql-server/mysql-test/mysql-test-run.pl  --repeat=2 rpl.rpl_replication_observers_example_plugin_server_startup
MySQL Version 5.7.11
Checking supported features...
 - SSL connections supported
Collecting tests...
 - adding combinations for rpl
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/danielgb/mysql-server-build/mysql-test/var'...
 - symlinking 'var' to '/dev/shm/var_auto_XkYW'
Installing system database...

==============================================================================

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
rpl.rpl_replication_observers_example_plugin_server_startup 'mix' [ pass ]     46
rpl.rpl_replication_observers_example_plugin_server_startup 'mix' [ fail ]
        Test ended at 2016-03-29 11:58:05

CURRENT_TEST: rpl.rpl_replication_observers_example_plugin_server_startup
mysqltest: In included file ./include/uninstall_replication_observers_example.inc at line 11:
included from ./extra/rpl_tests/rpl_replication_observers_example_plugin_server_startup.inc at line 53:
included from /home/danielgb/mysql-server/mysql-test/suite/rpl/t/rpl_replication_observers_example_plugin_server_startup.test at line 10:
At line 11: query 'UNINSTALL PLUGIN replication_observers_example' failed: 1305: PLUGIN replication_observers_example does not exist

The result from queries just before the failure was:
include/rpl_replication_observers_example_plugin_server_startup.inc
#
# Cause an explicit transaction in order to Trans Observer to be called
#
CREATE TABLE t1 (c1 INT PRIMARY KEY) Engine=InnoDB;
INSERT t1 VALUES(1);
BEGIN;
INSERT t1 VALUES(2);
ROLLBACK;
DROP TABLE t1;
#
# Uninstall the Plugin to cause output of the hooks
#
safe_process[30589]: Child process: 30590, exit: 1

 - the logfile can be found in '/home/danielgb/mysql-server-build/mysql-test/var/log/rpl.rpl_replication_observers_example_plugin_server_startup-mix/rpl_replication_observers_example_plugin_server_startup.log'

Only  1  of 3 completed.
mysql-test-run: *** ERROR: Not all tests completed

How to repeat:
[danielgb@blade4a mysql-server-build]$ (cd mysql-test; ./mtr --repeat=2 rpl.rpl_replication_observers_example_plugin_server_startup )

Suggested fix:
better test cleanup.
[29 Mar 2016 4:13] MySQL Verification Team
Hello Daniel,

Thank you for the report.

Thanks,
Umesh