Commit 792d6b34 authored by Sergei Golubchik's avatar Sergei Golubchik

skip cassandra.test unless cassandra is running

parent ab83952f
#
# suite.pm will make sure that all tests including this file
# will be skipped unless innodb or xtradb is enabled
#
# The test below is redundant
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'cassandra' AND support IN ('YES', 'DEFAULT', 'ENABLED')`)
{
--skip Test requires Cassandra.
}
......@@ -2,10 +2,18 @@ package My::Suite::Plugins;
@ISA = qw(My::Suite);
sub cassandra_running() {
return 0 if IS_WINDOW;
system 'echo show version | cqlsh -3 2>/dev/null >/dev/null';
return $? == 0;
}
sub skip_combinations {
my %skip;
$skip{'t/pam.test'} = 'No pam setup for mtr'
unless -e '/etc/pam.d/mariadb_mtr';
$skip{'t/cassandra.test'} = 'Cassandra is not running'
unless cassandra_running();
%skip;
}
......
#
# Tests for cassandra storage engine
#
--source include/have_cassandra.inc
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'cassandra' AND support IN ('YES', 'DEFAULT', 'ENABLED')`)
{
--skip Test requires Cassandra.
}
--disable_warnings
drop table if exists t0, t1;
......
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