Skip to content

Commit eaa8c4c

Browse files
authored
Merge pull request #25 from twata1/fix-failed-tests-for-windows
Add disconnect method explicitly to pass tests for windows
2 parents 7fcf681 + b19d7f0 commit eaa8c4c

4 files changed

Lines changed: 7 additions & 0 deletions

File tree

t/09-resultset.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,5 @@ $result->rewind;
173173
diag "calling next() after add_term() with 'op'" . $result->next; ## this should return the object which has "rating == 3".
174174
}
175175

176+
$wine->driver->dbh->disconnect;
176177
teardown_dbs(qw( global ));

t/10-resultset-peek.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,5 @@ is $result->peek_next->name, 'Stags Leap', 'the next one will be Stags Leap';
147147
is $result->next->name, 'Stags Leap';
148148
ok ! $result->peek_next, "Stags Leap was the last one";
149149

150+
$wine->driver->dbh->disconnect;
150151
teardown_dbs(qw( global ));

t/12-windows.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ ok( !$iter->(), "No third row; limit argument respected" );
9999
is( $load_count, 2, "2 objects loaded; limit argument respected");
100100
$iter->end;
101101

102+
$r->driver->dbh->disconnect;
103+
$i->driver->dbh->disconnect;
102104
teardown_dbs(qw( global ));
103105

104106
print Dumper( Data::ObjectDriver->profiler->query_log ) if $ENV{DOD_PROFILE};

t/35-multiplexed.t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,7 @@ sub _check_object {
139139
is $obj2->recipe_id, $obj->recipe_id;
140140
}
141141

142+
for my $driver (@{ Ingredient2Recipe->driver->drivers }) {
143+
$driver->dbh->disconnect;
144+
}
142145
teardown_dbs(qw( global1 global2 ));

0 commit comments

Comments
 (0)