summaryrefslogtreecommitdiff
path: root/mysql-test/lib/My/Test.pm
diff options
context:
space:
mode:
authorMagnus Svensson <msvensson@mysql.com>2008-11-14 11:49:12 +0100
committerMagnus Svensson <msvensson@mysql.com>2008-11-14 11:49:12 +0100
commit950d5d27605572a582059447dba219cb7df99a13 (patch)
tree99d22bc73318d5ba8436e7372166cef4db621bf8 /mysql-test/lib/My/Test.pm
parent562f1d6571129afcda902ce8275d6049dc0c0a52 (diff)
downloadmariadb-git-950d5d27605572a582059447dba219cb7df99a13.tar.gz
Bug#40715 mtr fails when running the same test case in parallel threads
mysql-test/lib/My/Test.pm: Use a more unique key to identify which test has been serialized
Diffstat (limited to 'mysql-test/lib/My/Test.pm')
-rw-r--r--mysql-test/lib/My/Test.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/mysql-test/lib/My/Test.pm b/mysql-test/lib/My/Test.pm
index 890ae76b282..68b100f91af 100644
--- a/mysql-test/lib/My/Test.pm
+++ b/mysql-test/lib/My/Test.pm
@@ -26,9 +26,7 @@ sub new {
#
sub key {
my ($self)= @_;
- my $key= $self->{name};
- $key.= "+".$self->{combination} if $self->{combination};
- return $key;
+ return $self->{key};
}
@@ -57,6 +55,9 @@ sub is_failed {
sub write_test {
my ($test, $sock, $header)= @_;
+ # Give the test a unique key before serializing it
+ $test->{key}= "$test" unless defined $test->{key};
+
print $sock $header, "\n";
while ((my ($key, $value)) = each(%$test)) {
print $sock $key, "= ";