@@ -228,15 +228,16 @@ void main() {
228
228
await tx.execute (
229
229
'INSERT OR ROLLBACK INTO test_data(id, description) VALUES(?, ?)' ,
230
230
[2 , 'test2' ]);
231
- expect (await tx.isOpen (), equals (true ));
231
+ expect (await tx.getAutoCommit (), equals (false ));
232
232
try {
233
233
await tx.execute (
234
234
'INSERT OR ROLLBACK INTO test_data(id, description) VALUES(?, ?)' ,
235
235
[2 , 'test3' ]);
236
236
} catch (e) {
237
237
// Ignore
238
238
}
239
- expect (await tx.isOpen (), equals (false ));
239
+ expect (await tx.getAutoCommit (), equals (true ));
240
+ expect (tx.closed, equals (false ));
240
241
241
242
// Will not be executed because of the above rollback
242
243
ignore (tx.execute (
@@ -356,14 +357,16 @@ void main() {
356
357
}
357
358
expect (caught, equals (true ));
358
359
359
- expect (await tx.isOpen (), equals (true ));
360
+ expect (await tx.getAutoCommit (), equals (false ));
361
+ expect (tx.closed, equals (false ));
360
362
361
363
final rs = await tx.execute (
362
364
'INSERT INTO test_data(description) VALUES(?) RETURNING description' ,
363
365
['Test Data' ]);
364
366
expect (rs.rows[0 ], equals (['Test Data' ]));
365
367
});
366
- expect (await savedTx! .isOpen (), equals (false ));
368
+ expect (await savedTx! .getAutoCommit (), equals (true ));
369
+ expect (savedTx! .closed, equals (true ));
367
370
});
368
371
});
369
372
}
0 commit comments