We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 090a459 commit e471fefCopy full SHA for e471fef
test/pool_test.dart
@@ -267,5 +267,21 @@ void main() {
267
await expectLater(() => rs, throwsA(isA<PgException>()));
268
});
269
270
+
271
+ withPostgresServer('inner connection close', (server) {
272
+ test('connection from inside withConnection', () async {
273
+ final pool = await openPool(server);
274
+ final rs = pool.withConnection((c) async {
275
+ await Future.wait([
276
+ Future.delayed(
277
+ Duration(milliseconds: 200),
278
+ () => c.close(force: true),
279
+ ),
280
+ runLongQuery(c),
281
+ ]);
282
+ });
283
+ await expectLater(() => rs, throwsA(isA<PgException>()));
284
285
286
287
}
0 commit comments