Only load DBICTest::Schema when needed in tests
[dbsrgits/DBIx-Class.git] / t / 73oracle_hq.t
index 0595edf..26b9bd7 100644 (file)
@@ -3,6 +3,12 @@ use warnings;
 
 use Test::Exception;
 use Test::More;
+
+# I *strongly* suspect Oracle has an implicit stable output order when
+# dealing with HQs. So just punt on the entire shuffle thing.
+BEGIN { $ENV{DBIC_SHUFFLE_UNORDERED_RESULTSETS} = 0 }
+
+
 use DBIx::Class::Optional::Dependencies ();
 use lib qw(t/lib);
 
@@ -18,8 +24,8 @@ plan skip_all => 'Set $ENV{DBICTEST_ORA_DSN}, _USER and _PASS to run this test.'
 plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_oracle')
   unless DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_oracle');
 
-use DBICTest::Schema::Artist;
-BEGIN {
+{
+  require DBICTest::Schema::Artist;
   DBICTest::Schema::Artist->add_column('parentid');
 
   DBICTest::Schema::Artist->has_many(
@@ -34,9 +40,8 @@ BEGIN {
 }
 
 use DBICTest;
-use DBICTest::Schema;
 
-my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
+my $schema = DBICTest->connect_schema($dsn, $user, $pass);
 
 note "Oracle Version: " . $schema->storage->_server_info->{dbms_version};