Skip to content

Commit a6147f8

Browse files
palichoroba
authored andcommitted
Do not run async tests with Embedded server
Async mode is not supported for Embedded server.
1 parent 4307922 commit a6147f8

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

t/78use_result.t

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ use warnings;
44
use Test::More;
55
use Test::Deep;
66
use DBI;
7+
use DBI::Const::GetInfoType;
78

89
use vars qw($test_dsn $test_user $test_password);
910
use lib 't', '.';
1011
require 'lib.pl';
1112

1213
my $dbh1 = DbiTestConnect($test_dsn, $test_user, $test_password, { RaiseError => 1, PrintError => 0 });
1314

14-
plan tests => 12 + 2*2*2*1 + 3 * (2*2*2*13 + 2*2*2 + 2*2*9);
15+
my $have_async_support = $dbh1->get_info($GetInfoType{'SQL_ASYNC_MODE'});
16+
17+
my $mult = ($have_async_support ? 2 : 1);
18+
plan tests => 12 + 2*$mult*2*1 + 3 * (2*$mult*2*13 + 2*$mult*9) + ($have_async_support ? 3*2*2*2 : 0);
1519

1620
$SIG{__WARN__} = sub { die @_ };
1721

@@ -45,7 +49,7 @@ for my $multi_statements (0, 1) {
4549
$dbh->do('INSERT INTO t VALUES(1, 20)');
4650
$dbh->do('INSERT INTO t VALUES(2, 30)');
4751

48-
for my $async (0, 1) {
52+
for my $async (0, ($have_async_support ? 1 : ())) {
4953

5054
for my $use_result (0, 1) {
5155

t/87async.t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password,
1616
if ($dbh->{mariadb_serverversion} < 50012) {
1717
plan skip_all => "Servers < 5.0.12 do not support SLEEP()";
1818
}
19+
if ($dbh->{mariadb_hostinfo} eq 'Embedded') {
20+
plan skip_all => 'Async mode is not supported for Embedded server';
21+
}
1922
plan tests => 150;
2023

2124
is $dbh->get_info($GetInfoType{'SQL_ASYNC_MODE'}), 2; # statement-level async

t/88async-multi-stmts.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ require 'lib.pl';
1010

1111
my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password,
1212
{ RaiseError => 0, PrintError => 0, AutoCommit => 0, mariadb_multi_statements => 1 });
13+
plan skip_all => 'Async mode is not supported for Embedded server' if $dbh->{mariadb_hostinfo} eq 'Embedded';
1314
plan tests => 104;
1415

1516
ok $dbh->do(<<SQL);

t/89async-method-check.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ my %sth_args = (
8383

8484
my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password,
8585
{ RaiseError => 0, PrintError => 0, AutoCommit => 0 });
86+
plan skip_all => 'Async mode is not supported for Embedded server' if $dbh->{mariadb_hostinfo} eq 'Embedded';
8687
plan tests =>
8788
2 * @db_safe_methods +
8889
4 * @db_unsafe_methods +

0 commit comments

Comments
 (0)