mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-28 08:51:44 +00:00
t/lib/SchemaIterator.t shouldn't assume that the order of the foreign key constraints is deterministic
This commit is contained in:
@@ -93,14 +93,10 @@ sub test_so {
|
||||
}
|
||||
|
||||
return \@objs if $args{return_objs};
|
||||
|
||||
if ( $result_file ) {
|
||||
ok(
|
||||
no_diff(
|
||||
$res,
|
||||
$args{result},
|
||||
cmd_output => 1,
|
||||
),
|
||||
is(
|
||||
sort_query_output($res),
|
||||
sort_query_output(do { local $/; open(my $fh, "<", $args{result}); <$fh>}),
|
||||
$args{test_name},
|
||||
);
|
||||
}
|
||||
@@ -122,6 +118,17 @@ sub test_so {
|
||||
return;
|
||||
}
|
||||
|
||||
sub sort_query_output {
|
||||
my $queries = shift;
|
||||
my @queries = split /\n\n/, $queries;
|
||||
|
||||
my $sorted;
|
||||
for my $query (@queries) {
|
||||
$sorted .= join "\n", sort split /\n/, $query;
|
||||
}
|
||||
return $sorted;
|
||||
}
|
||||
|
||||
SKIP: {
|
||||
skip "Cannot connect to sandbox master", 22 unless $dbh;
|
||||
$sb->wipe_clean($dbh);
|
||||
|
Reference in New Issue
Block a user