Commit 950d5d27 authored by Magnus Svensson's avatar Magnus Svensson

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
parent 562f1d65
...@@ -26,9 +26,7 @@ sub new { ...@@ -26,9 +26,7 @@ sub new {
# #
sub key { sub key {
my ($self)= @_; my ($self)= @_;
my $key= $self->{name}; return $self->{key};
$key.= "+".$self->{combination} if $self->{combination};
return $key;
} }
...@@ -57,6 +55,9 @@ sub is_failed { ...@@ -57,6 +55,9 @@ sub is_failed {
sub write_test { sub write_test {
my ($test, $sock, $header)= @_; my ($test, $sock, $header)= @_;
# Give the test a unique key before serializing it
$test->{key}= "$test" unless defined $test->{key};
print $sock $header, "\n"; print $sock $header, "\n";
while ((my ($key, $value)) = each(%$test)) { while ((my ($key, $value)) = each(%$test)) {
print $sock $key, "= "; print $sock $key, "= ";
......
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