Commit 7a79fe52 authored by Michael Widenius's avatar Michael Widenius

Fixes to mysql-test-run and tests

- Added ORDER BY to get consistent results to federated_server
- Sort slow tests first

mysql-test/lib/My/ConfigFactory.pm:
  Remove usage of port as the test suite is not using that anymore and it causes some probelms in buildbot
mysql-test/lib/mtr_cases.pm:
  Sort slow tests first
  If a test is marked as 'big_test' also mark it as 'long_test'
mysql-test/suite/federated/federated_server.result:
  Added ORDER BY to get consistent results
mysql-test/suite/federated/federated_server.test:
  Added ORDER BY to get consistent results
parent 3358cdd5
......@@ -627,7 +627,7 @@ sub new_config {
}, $class;
# add auto-options
$config->insert('OPT', 'port' => sub { fix_port($self, $config) });
# $config->insert('OPT', 'port' => sub { fix_port($self, $config) });
$config->insert('OPT', 'vardir' => sub { $self->{ARGS}->{vardir} });
{
......
......@@ -91,15 +91,16 @@ sub init_pattern {
sub testcase_sort_order {
my ($a, $b, $sort_criteria)= @_;
my $a_sort_criteria= $sort_criteria->{$a->fullname()};
my $b_sort_criteria= $sort_criteria->{$b->fullname()};
my $res= $a_sort_criteria cmp $b_sort_criteria;
return $res if $res;
# Run slow tests first, trying to avoid getting stuck at the end
# with a slow test in one worker and the other workers idle.
return -1 if $a->{'long_test'} && !$b->{'long_test'};
return 1 if !$a->{'long_test'} && $b->{'long_test'};
my $a_sort_criteria= $sort_criteria->{$a->fullname()};
my $b_sort_criteria= $sort_criteria->{$b->fullname()};
my $res= $a_sort_criteria cmp $b_sort_criteria;
return $res if $res;
return $a->fullname() cmp $b->fullname();
}
......@@ -915,6 +916,11 @@ sub collect_one_test_case {
$tinfo->{'comment'}= "Test needs --big-test";
return $tinfo
}
if ( $tinfo->{'big_test'} )
{
# All 'big_test' takes a long time to run
$tinfo->{'long_test'}= 1;
}
if ( $tinfo->{'need_debug'} && ! $::debug_compiled_binaries )
{
......
......@@ -54,7 +54,7 @@ PASSWORD '',
PORT SLAVE_PORT,
SOCKET '',
OWNER 'root');
select * from mysql.servers;
select * from mysql.servers order by db;
Server_name Host Db Username Password Port Socket Wrapper Owner
server_one 127.0.0.1 first_db root SLAVE_PORT mysql root
server_two 127.0.0.1 second_db root SLAVE_PORT mysql root
......@@ -154,7 +154,7 @@ id name
drop table federated.t1;
drop server 'server_one';
drop server 'server_two';
select * from mysql.servers;
select * from mysql.servers order by db;
Server_name Host Db Username Password Port Socket Wrapper Owner
drop table first_db.t1;
drop table second_db.t1;
......
......@@ -66,7 +66,7 @@ eval create server 'server_two' foreign data wrapper 'mysql' options
OWNER 'root');
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval select * from mysql.servers;
eval select * from mysql.servers order by db;
DROP TABLE IF EXISTS federated.old;
--replace_result $SLAVE_MYPORT SLAVE_PORT
......@@ -151,7 +151,7 @@ drop table federated.t1;
drop server 'server_one';
drop server 'server_two';
select * from mysql.servers;
select * from mysql.servers order by db;
connection slave;
drop table first_db.t1;
......
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