summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <mkindahl@dl145h.mysql.com>2008-02-15 10:24:13 +0100
committerunknown <mkindahl@dl145h.mysql.com>2008-02-15 10:24:13 +0100
commit410e2d64d14fc2ea5193fc0111142aca182ed348 (patch)
treed8d0b18ced5307c49c4702ff5c8674a9c243146a
parent58a79add8a0ad005300f45938da99c5ef93b3d50 (diff)
downloadmariadb-git-410e2d64d14fc2ea5193fc0111142aca182ed348.tar.gz
Adding waits to events_scheduling to prevent the test from
failing on heavily loaded systems. mysql-test/t/events_scheduling.test: Adding waits before statements since the scheduler is unpredictable on loaded systems and might be delayed.
-rw-r--r--mysql-test/t/events_scheduling.test13
1 files changed, 12 insertions, 1 deletions
diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test
index 4541ee1eb36..a5133166495 100644
--- a/mysql-test/t/events_scheduling.test
+++ b/mysql-test/t/events_scheduling.test
@@ -76,11 +76,22 @@ let $wait_condition=select count(*) = 0 from information_schema.events
where event_name='event_4' and status='enabled';
--source include/wait_condition.inc
-# check the data
+# Wait for the events to fire and check the data afterwards
+let $wait_condition=SELECT SUM(a) >= 4 FROM table_1;
+source include/wait_condition.inc;
SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1;
+
+let $wait_condition=SELECT SUM(a) >= 5 FROM table_2;
+source include/wait_condition.inc;
SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2;
+
+let $wait_condition=SELECT SUM(a) >= 1 FROM table_3;
+source include/wait_condition.inc;
SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3;
+
+let $wait_condition=SELECT SUM(a) >= 1 FROM table_4;
+source include/wait_condition.inc;
SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4;
SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR')