2 use Test::More tests => 13;
4 use t::common qw( new_fh );
8 my ($fh, $filename) = new_fh();
9 my $db1 = DBM::Deep->new(
15 my $db2 = DBM::Deep->new(
22 is( $db1->{x}, 'y', "Before transaction, DB1's X is Y" );
23 is( $db2->{x}, 'y', "Before transaction, DB2's X is Y" );
27 is( $db1->{x}, 'y', "DB1 transaction started, no actions - DB1's X is Y" );
28 is( $db2->{x}, 'y', "DB1 transaction started, no actions - DB2's X is Y" );
31 is( $db1->{x}, 'z', "Within DB1 transaction, DB1's X is Z" );
32 is( $db2->{x}, 'y', "Within DB1 transaction, DB2's X is still Y" );
34 $db2->{other_x} = 'foo';
35 is( $db2->{other_x}, 'foo', "DB2 set other_x within DB1's transaction, so DB2 can see it" );
36 is( $db1->{other_x}, undef, "Since other_x was added after the transaction began, DB1 doesn't see it." );
41 local $TODO = 'Need to finish auditing first before commit will work.';
42 is( $db1->{x}, 'z', "After commit, DB1's X is Y" );
43 is( $db2->{x}, 'z', "After commit, DB2's X is Y" );
46 is( $db1->{other_x}, 'foo', "After DB1 transaction is over, DB1 can see other_x" );
47 is( $db2->{other_x}, 'foo', "After DB1 transaction is over, DB2 can still see other_x" );