@@ -228,15 +228,16 @@ void main() {
228228 await tx.execute (
229229 'INSERT OR ROLLBACK INTO test_data(id, description) VALUES(?, ?)' ,
230230 [2 , 'test2' ]);
231- expect (await tx.isOpen (), equals (true ));
231+ expect (await tx.getAutoCommit (), equals (false ));
232232 try {
233233 await tx.execute (
234234 'INSERT OR ROLLBACK INTO test_data(id, description) VALUES(?, ?)' ,
235235 [2 , 'test3' ]);
236236 } catch (e) {
237237 // Ignore
238238 }
239- expect (await tx.isOpen (), equals (false ));
239+ expect (await tx.getAutoCommit (), equals (true ));
240+ expect (tx.closed, equals (false ));
240241
241242 // Will not be executed because of the above rollback
242243 ignore (tx.execute (
@@ -356,14 +357,16 @@ void main() {
356357 }
357358 expect (caught, equals (true ));
358359
359- expect (await tx.isOpen (), equals (true ));
360+ expect (await tx.getAutoCommit (), equals (false ));
361+ expect (tx.closed, equals (false ));
360362
361363 final rs = await tx.execute (
362364 'INSERT INTO test_data(description) VALUES(?) RETURNING description' ,
363365 ['Test Data' ]);
364366 expect (rs.rows[0 ], equals (['Test Data' ]));
365367 });
366- expect (await savedTx! .isOpen (), equals (false ));
368+ expect (await savedTx! .getAutoCommit (), equals (true ));
369+ expect (savedTx! .closed, equals (true ));
367370 });
368371 });
369372}
0 commit comments