Updated Peristance layer to use the new error_hanler based on EWF error library.

Remove once use from DATABASE_ERROR_HANDLER.
Initial support transaction handling.
This commit is contained in:
jvelilla
2014-10-17 08:53:02 -03:00
parent 3c73202a0d
commit 5cb26f0b24
18 changed files with 254 additions and 674 deletions

View File

@@ -66,77 +66,6 @@ feature -- Test routines
assert ("Not has nodes:", node_provider.count = 0)
end
test_user_node_nested_transaction_with_rollback_not_supported
note
testing: "execution/isolated"
do
connection.begin_transaction2
user_provider.new_user ("test", "test","test@admin.com")
assert ("Has user:", user_provider.has_user)
node_provider.new_node (default_node)
assert ("Has one node:", node_provider.count = 1)
connection.begin_transaction2
user_provider.new_user ("test1", "test1","test1@admin.com")
assert ("Has user: test1", attached user_provider.user_by_name ("test1"))
connection.rollback2
connection.commit2
assert ("Has user test:", attached user_provider.user_by_name ("test"))
assert ("Has nodes:", node_provider.count = 1)
assert ("Not has user: test1", user_provider.user_by_name ("test1") = Void)
end
test_user_node_nested_transaction_with_commit
note
testing: "execution/isolated"
do
connection.begin_transaction2
user_provider.new_user ("test", "test","test@admin.com")
assert ("Has user:", user_provider.has_user)
node_provider.new_node (default_node)
assert ("Has one node:", node_provider.count = 1)
connection.begin_transaction2
user_provider.new_user ("test1", "test1","test1@admin.com")
assert ("Has user: test1", attached user_provider.user_by_name ("test1"))
connection.commit2
connection.commit2
assert ("Has user test:", attached user_provider.user_by_name ("test"))
assert ("Has user test1:", attached user_provider.user_by_name ("test1"))
assert ("Has nodes:", node_provider.count = 1)
end
test_user_node_nested_transaction_with_rollback
note
testing: "execution/isolated"
do
connection.begin_transaction2
user_provider.new_user ("test", "test","test@admin.com")
assert ("Has user:", user_provider.has_user)
node_provider.new_node (default_node)
assert ("Has one node:", node_provider.count = 1)
connection.begin_transaction2
user_provider.new_user ("test1", "test1","test1@admin.com")
assert ("Has user: test1", attached user_provider.user_by_name ("test1"))
connection.commit2
connection.rollback2
assert ("Not Has user test:", user_provider.user_by_name ("test") = void)
assert ("Not Has user test1:", user_provider.user_by_name ("test1") = void)
assert ("Has 0 nodes:", node_provider.count = 0)
end
feature {NONE} -- Implementation
node_provider: NODE_DATA_PROVIDER