Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed flaky tests #862

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions t/pt-table-sync/char_chunking.t
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@ $sb->create_dbs($source_dbh, ['test']);
$sb->load_file('source', "t/lib/samples/char-chunking/ascii.sql", "test");
$source_dbh->do('alter table test.ascii drop column `i`');

wait_until(
sub {
my $row;
eval {$row = $replica_dbh->selectall_arrayref("select * from test.ascii");};
return 1 if $row && @$row > 100;
},
);
$sb->wait_for_replicas();

$replica_dbh->do('delete from test.ascii where c like "Zesus%"');

Expand Down
2 changes: 2 additions & 0 deletions t/pt-table-sync/issue_218.t
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ $sb->wipe_clean($replica_dbh);
$sb->create_dbs($source_dbh, [qw(issue218)]);
$sb->use('source', '-e "CREATE TABLE issue218.t1 (i INT)"');
$sb->use('source', '-e "INSERT INTO issue218.t1 VALUES (NULL)"');
$sb->wait_for_replicas();

qx($trunk/bin/pt-table-sync --no-check-replica --print --database issue218 h=127.1,P=12345,u=msandbox,p=msandbox P=12346);
ok(!$?, 'Issue 218: NULL values compare as equal');

Expand Down
4 changes: 4 additions & 0 deletions t/pt-table-sync/pt-1256.t
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ like(
"PT-1256 Set the correct charset"
);

$sb->wait_for_replicas();

SKIP: {
my $vp = VersionParser->new($source_dbh);
if ($vp->cmp('8.0') > -1 && $vp->cmp('8.0.14') < 0 && $vp->flavor() !~ m/maria/i) {
Expand All @@ -91,6 +93,8 @@ SKIP: {
$output = `$trunk/bin/pt-table-sync --execute --lock-and-rename h=127.1,P=12345,u=msandbox,p=msandbox,D=test,t=t1 t=t2 2>&1`;
$output = `/tmp/12345/use -e 'show create table test.t2'`;
like($output, qr/COMMENT='test1'/, '--lock-and-rename worked');

$sb->wait_for_replicas();

#4
$row = $replica1_dbh->selectrow_hashref("SELECT f2 FROM test.t2 WHERE id = 1");
Expand Down
Loading