Skip to content

Improve message on failure of rollback(auto) #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jgebal opened this issue Jun 23, 2017 · 1 comment
Closed

Improve message on failure of rollback(auto) #364

jgebal opened this issue Jun 23, 2017 · 1 comment
Assignees
Milestone

Comments

@jgebal
Copy link
Member

jgebal commented Jun 23, 2017

Currently the message says:
Savepoint not established. Implicit commit might have occured.
That message is not saying what is wrong to the users.
A message like:

Unable to perform automatic rollback after procedure: my_demo_test_package.cleanup
An implicit or explicit commit/rollback occurred.
Use the %rollback(manual) annotation or remove commits/rollback/ddl statements that are causing the issue.

To be able to point to a point, where rollback was to be performed, we need to pass the ut_executable to rollback_to_savepoint procedure.

@jgebal
Copy link
Member Author

jgebal commented Jun 27, 2017

I was thinking of following approach:
In ut_suite_item have start_transaction_id.
The value of that variable would be set when savepoint is created (using DBMS_TRANSACTION.LOCAL_TRANSACTION_ID)
Inside ut_executable we can reference the value of start_transaction_id from the self passed by invoking test/suite.
We could then check in the ut_executeable, after executing block, if transaction id is still the same.
If it's NULL or it is changed, commit/rollback was done.

This way we can identify exactly where the savepoint was broken and provide a proper error/failure/warning message.

@jgebal jgebal added this to the v3.1.0 milestone Jul 17, 2017
@ghost ghost assigned jgebal Jul 17, 2017
@ghost ghost removed the in progress label Jul 20, 2017
@Pazus Pazus modified the milestones: v3.0.3, v3.1.0 Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants