Skip to content

Commit a4355c3

Browse files
committed
PS-10166 [8.0]: Improve stability of main.log_buffered-big
1 parent 6bd74a6 commit a4355c3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mysql-test/t/log_buffered-big.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ SELECT "[ PASS ] Server has restarted.";
145145
my $file_trad= $ENV{'LOG_FILE_TRAD'};
146146
my $file_conv= $ENV{'LOG_FILE_JSON_TO_TRAD'};
147147

148+
# Two messages with timestamps differing by microseconds may arrive
149+
# in reverse order in the two sinks — even though both are correct and complete.
150+
# To avoid false failures, sort both logs before comparing.
151+
system("sort $file_trad -o $file_trad.sorted") == 0 or die "sort failed for $file_trad";
152+
rename("$file_trad.sorted", $file_trad) or die "rename failed for $file_trad: $!";
153+
system("sort $file_conv -o $file_conv.sorted") == 0 or die "sort failed for $file_conv";
154+
rename("$file_conv.sorted", $file_conv) or die "rename failed for $file_conv: $!";
155+
148156
my $compare = compare($file_conv, $file_trad);
149157

150158
if ($compare == 0) {

0 commit comments

Comments
 (0)