Skip to content

Instantly share code, notes, and snippets.

@rbuels
Created September 3, 2009 20:08
Show Gist options
  • Save rbuels/180512 to your computer and use it in GitHub Desktop.
Save rbuels/180512 to your computer and use it in GitHub Desktop.
sub drop_ext_apk_test_schema {
my ( $schema, $no_warn ) = @_;
$schema->storage->dbh_do(sub {
my (undef,$dbh) = @_;
local $dbh->{Warn} = 1;
local $dbh->{RaiseError} = 0;
local $SIG{__WARN__} = \&diag;
# drop the test schemas
$dbh->do("DROP SCHEMA $_ CASCADE")
for @apk_schemas;
});
}
DBI Exception: DBD::Pg::db do failed: ERROR: schema "dbic_apk_0" does not exist at /crypt/rob/dev/general/pg_unqualified_schema/lib/DBIx/Class/Schema.pm line 1027
DBIx::Class::Schema::throw_exception('DBICTest::Schema=HASH(0x8ad8760)', 'DBI Exception: DBD::Pg::db do failed: ERROR: schema "dbic_ap...') called at /crypt/rob/dev/general/pg_unqualified_schema/lib/DBIx/Class/Storage.pm line 123
DBIx::Class::Storage::throw_exception('DBIx::Class::Storage::DBI::Pg=HASH(0x8baf270)', 'DBI Exception: DBD::Pg::db do failed: ERROR: schema "dbic_ap...') called at /crypt/rob/dev/general/pg_unqualified_schema/lib/DBIx/Class/Storage/DBI.pm line 994
DBIx::Class::Storage::DBI::__ANON__('DBD::Pg::db do failed: ERROR: schema "dbic_apk_0" does not e...', 'DBI::db=HASH(0x8f51198)', undef) called at t/72pg.t line 539
main::__ANON__('DBIx::Class::Storage::DBI::Pg=HASH(0x8baf270)', 'DBI::db=HASH(0x8f51198)') called at /crypt/rob/dev/general/pg_unqualified_schema/lib/DBIx/Class/Storage/DBI.pm line 583
eval {...} called at /crypt/rob/dev/general/pg_unqualified_schema/lib/DBIx/Class/Storage/DBI.pm line 569
DBIx::Class::Storage::DBI::dbh_do('DBIx::Class::Storage::DBI::Pg=HASH(0x8baf270)', 'CODE(0x90dcde0)') called at t/72pg.t line 540
main::drop_ext_apk_test_schema('DBICTest::Schema=HASH(0x8ad8760)') called at t/72pg.t line 492
main::run_extended_apk_tests('DBICTest::Schema=HASH(0x8ad8760)') called at t/72pg.t line 65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment