diff options
author | Dan Gudmundsson <[email protected]> | 2014-04-03 13:43:38 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-04-11 09:59:11 +0200 |
commit | c9245f29ff5c5a59a58749cb3dceb2eaad4957e0 (patch) | |
tree | 498d6dd880a662e6c2c8389890ca3019aaaf67ce /lib/mnesia/test/mnesia_trans_access_test.erl | |
parent | bee0ea4125e8b47478b77904bee06f8f38bbab42 (diff) | |
download | otp-c9245f29ff5c5a59a58749cb3dceb2eaad4957e0.tar.gz otp-c9245f29ff5c5a59a58749cb3dceb2eaad4957e0.tar.bz2 otp-c9245f29ff5c5a59a58749cb3dceb2eaad4957e0.zip |
mnesia: Improve tests
Need to re-raise the match macro if inside transaction
Diffstat (limited to 'lib/mnesia/test/mnesia_trans_access_test.erl')
-rw-r--r-- | lib/mnesia/test/mnesia_trans_access_test.erl | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/mnesia/test/mnesia_trans_access_test.erl b/lib/mnesia/test/mnesia_trans_access_test.erl index 157e441b27..237984978e 100644 --- a/lib/mnesia/test/mnesia_trans_access_test.erl +++ b/lib/mnesia/test/mnesia_trans_access_test.erl @@ -677,7 +677,7 @@ check_res(sync_dirty, Res) when is_list(Res) -> check_res(ets, Res) when is_list(Res) -> Res; check_res(Type,Res) -> - ?match(bug,{Type,Res}). + ?match({bug, bug},{Type,Res}). read_op(Oid) -> case lists:reverse(mnesia:read(Oid)) of @@ -1118,10 +1118,7 @@ create_live_table_index(Config, Storage) -> ValPos = 3, mnesia:dirty_write({Tab, 1, 2}), - Fun = fun() -> - ?match(ok, mnesia:write({Tab, 2, 2})), - ok - end, + Fun = fun() -> mnesia:write({Tab, 2, 2}) end, ?match({atomic, ok}, mnesia:transaction(Fun)), ?match({atomic, ok}, mnesia:add_table_index(Tab, ValPos)), IRead = fun() -> lists:sort(mnesia:index_read(Tab, 2, ValPos)) end, |