[Bast-commits] r7377 - in
branches/DBIx-Class-Schema-Loader/mssql_tweaks/t: . lib
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Mon Aug 24 15:39:56 GMT 2009
Author: caelum
Date: 2009-08-24 15:39:56 +0000 (Mon, 24 Aug 2009)
New Revision: 7377
Modified:
branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/15sybase_common.t
branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/lib/dbixcsl_common_tests.pm
branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/lib/dbixcsl_mssql_extra_tests.pm
Log:
finished cleaning up branch, all tests pass
Modified: branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/15sybase_common.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/15sybase_common.t 2009-08-24 15:19:46 UTC (rev 7376)
+++ branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/15sybase_common.t 2009-08-24 15:39:56 UTC (rev 7377)
@@ -9,11 +9,14 @@
my $password = $ENV{DBICTEST_SYBASE_PASS} || '';
my $tester = dbixcsl_common_tests->new(
- vendor => 'Sybase',
+ vendor => 'sybase',
auto_inc_pk => 'INTEGER IDENTITY NOT NULL PRIMARY KEY',
dsn => $dsn,
user => $user,
password => $password,
+# This is necessary because there are too many cursors open for transactions on
+# insert to work.
+ connect_info_opts => { on_connect_call => 'unsafe_insert' }
);
if( !$dsn || !$user ) {
Modified: branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/lib/dbixcsl_common_tests.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/lib/dbixcsl_common_tests.pm 2009-08-24 15:19:46 UTC (rev 7376)
+++ branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/lib/dbixcsl_common_tests.pm 2009-08-24 15:39:56 UTC (rev 7377)
@@ -58,7 +58,12 @@
$self->create();
- my @connect_info = ( $self->{dsn}, $self->{user}, $self->{password} );
+ my @connect_info = (
+ $self->{dsn},
+ $self->{user},
+ $self->{password},
+ $self->{connect_info_opts},
+ );
# First, with in-memory classes
my $schema_class = $self->setup_schema(@connect_info);
Modified: branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/lib/dbixcsl_mssql_extra_tests.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/lib/dbixcsl_mssql_extra_tests.pm 2009-08-24 15:19:46 UTC (rev 7376)
+++ branches/DBIx-Class-Schema-Loader/mssql_tweaks/t/lib/dbixcsl_mssql_extra_tests.pm 2009-08-24 15:39:56 UTC (rev 7377)
@@ -2,21 +2,31 @@
use Test::More;
+my $vendor = 'mssql';
+
+sub vendor {
+ shift;
+ $vendor = shift;
+}
+
sub extra { +{
create => [
qq{
- CREATE TABLE [mssql_loader_test1.dot] (
+ CREATE TABLE [${vendor}_loader_test1.dot] (
id INT IDENTITY NOT NULL PRIMARY KEY,
dat VARCHAR(8)
)
},
],
- drop => [ qw/ [mssql_loader_test1.dot] / ],
+ drop => [ "[${vendor}_loader_test1.dot]" ],
count => 4,
run => sub {
my ($schema, $monikers, $classes) = @_;
- ok((my $rs = eval { $schema->resultset('MssqlLoaderTest1Dot') }),
+ my $vendor_titlecased = "\u\L$vendor";
+
+ ok((my $rs = eval {
+ $schema->resultset("${vendor_titlecased}LoaderTest1Dot") }),
'got a resultset');
ok((my $from = eval { $rs->result_source->from }),
@@ -24,7 +34,7 @@
is ref($from), 'SCALAR', '->table is a scalar ref';
- is eval { $$from }, '[mssql_loader_test1.dot]',
+ is eval { $$from }, "[${vendor}_loader_test1.dot]",
'->table name is correct';
},
}}
More information about the Bast-commits
mailing list