Skip to content

Commit ce7d8c5

Browse files
committed
MDEV-7330 plugins.feedback_plugin_send fails sporadically in buildbot
The test restarts the server and expects that the feedback plugin will send a report on shutdown, and will write about it in the error log. But the server is only given 10 sec to shut down properly, which is not always enough. Added a parameter to restart_mysqld.inc, and set it to a bigger value in feedback_plugin_send
1 parent bdcf370 commit ce7d8c5

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

mysql-test/include/restart_mysqld.inc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# ==== Usage ====
2+
#
3+
# [--let $shutdown_timeout= 30]
4+
# [--let $allow_rpl_inited= 1]
5+
# --source include/restart_mysqld.inc
16

27
if ($rpl_inited)
38
{
@@ -7,6 +12,16 @@ if ($rpl_inited)
712
}
813
}
914

15+
--let $server_shutdown_timeout= 10
16+
if ($shutdown_timeout)
17+
{
18+
--let $server_shutdown_timeout= $shutdown_timeout
19+
}
20+
if ($shutdown_timeout == 0)
21+
{
22+
--let $server_shutdown_timeout= 0
23+
}
24+
1025
# Write file to make mysql-test-run.pl expect the "crash", but don't start
1126
# it until it's told to
1227
--let $_server_id= `SELECT @@server_id`
@@ -15,7 +30,7 @@ if ($rpl_inited)
1530

1631
# Send shutdown to the connected server and give
1732
# it 10 seconds to die before zapping it
18-
shutdown_server 10;
33+
shutdown_server $server_shutdown_timeout;
1934

2035
# Write file to make mysql-test-run.pl start up the server again
2136
--exec echo "restart" > $_expect_file_name

mysql-test/suite/plugins/t/feedback_plugin_send.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ if (!$MTR_FEEDBACK_PLUGIN) {
1414
# is doing some work in other workers.
1515
#
1616
sleep 310;
17+
18+
# The test expects that the plugin will send a report at least 2 times,
19+
# now (5 min after loading) and on server shutdown which happens below.
20+
# Since we have already waited for 5 min, let's be generous
21+
# and make sure the server has enough time to shut down properly.
22+
# We won't lose anything if the shutdown is fast, but if it's slow, the plugin
23+
# will still be able to finish the job and write about it in the error log.
24+
25+
--let $shutdown_timeout= 60
1726
source include/restart_mysqld.inc;
1827

1928
replace_result https http;

0 commit comments

Comments
 (0)