summaryrefslogtreecommitdiff
path: root/mysql-test/t/feedback_plugin_send.test
blob: d882539cfeac4fde48ad244f5aa0d9830da75e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
source t/feedback_plugin_load.test;

if (!$MTR_FEEDBACK_PLUGIN) {
  skip MTR_FEEDBACK_PLUGIN is not set;
}

#
# Yep. The plugin waits 5 minutes before sending anything,
# and there's no way to force it to send anything sooner.
# Let's wait, and hope that mtr is started with --parallel and
# is doing some work in other workers.
#
sleep 310;
source include/restart_mysqld.inc;

replace_result https http;
perl;
  $log_error= $ENV{'MYSQLTEST_VARDIR'} . '/log/mysqld.1.err';
  open(LOG, '<', $log_error) or die "open(< $log_error): $!";

  # Get the first few rows (as there may be different number rows in the log)
  $i= 0;
  while ($_=<LOG>)
  {
    if (/feedback plugin:.*/)
    {
      print "$&\n";
      break if ($i++ >= 3);
    }
  }
  close LOG;
EOF