X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F746sybase.t;h=e8a08d038575e9355ec2c5533de5cb339029a69d;hb=eb304a6408bf3b50f070f7c585bd825da6e2c38b;hp=7a71bd0497b108b1f742e97eebd0a70bf4fc1aa8;hpb=7357c7bc904dffcc917657c98e4bdef93d253117;p=dbsrgits%2FDBIx-Class.git diff --git a/t/746sybase.t b/t/746sybase.t index 7a71bd0..e8a08d0 100644 --- a/t/746sybase.t +++ b/t/746sybase.t @@ -18,17 +18,12 @@ if (not ($dsn && $user)) { 'Set $ENV{DBICTEST_SYBASE_DSN}, _USER and _PASS to run this test' . "\nWarning: This test drops and creates the tables " . "'artist' and 'bindtype_test'"; -} else { - plan tests => $TESTS*2 + 1; } my @storage_types = ( 'DBI::Sybase', 'DBI::Sybase::NoBindVars', ); -my $schema; -my $storage_idx = -1; - sub get_schema { DBICTest::Schema->connect($dsn, $user, $pass, { on_connect_call => [ @@ -46,9 +41,21 @@ my $ping_count = 0; }; } +my $schema; +my $storage_idx = -1; + for my $storage_type (@storage_types) { $storage_idx++; + _run_tests ($storage); +} + + + +is $ping_count, 0, 'no pings'; + + +sub _run_tests { unless ($storage_type eq 'DBI::Sybase') { # autodetect DBICTest::Schema->storage_type("::$storage_type"); } @@ -307,13 +314,13 @@ CREATE TABLE money_test ( SQL }); -# test insert transactions when there's an active cursor +# test insert transaction when there's an active cursor TODO: { - local $TODO = 'not supported yet or possibly ever'; +# local $TODO = 'not supported yet or possibly ever'; SKIP: { - skip 'not testing insert with active cursor unless using insert_txn', 1 - unless $schema->storage->insert_txn; + skip 'not testing insert with active cursor if using unsafe_insert', 1 + if $schema->storage->unsafe_insert; my $artist_rs = $schema->resultset('Artist'); $artist_rs->first; @@ -354,8 +361,6 @@ SQL diag $@ if $@; } -is $ping_count, 0, 'no pings'; - # clean up our mess END { if (my $dbh = eval { $schema->storage->_dbh }) {