-
Notifications
You must be signed in to change notification settings - Fork 17
Optimize availability check for "Run utPLSQL test" menu option #76
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
Comments
…k_menu_option #76 - Optmize check "Run utPLSQL test" menu option
@phsalvisberg |
@jgebal I checked. My JUnit test case fails with 3.1.7. All functions return false instead of true, because they do not update the annotation cache (without using the DDL trigger). I have not tested that with 3.1.8 yet. Maybe this is an issue there as well. |
The functionality was introduced in this change Since then it wasn't changed until this change and then this change in 3.1.8-develop I'm no sure why the functions don't work for you in 3.1.7. They should as they should update cache. If this didn't work for you before 3.1.8, lets leave it active since 3.1.8 only. |
The problem is that |
IMHO the functions should check if the DDL trigger is active. If not they have to update the annotation cache first. Similar logic as in |
If this will not be fixed in 3.1.8 I'll have to undo this change. |
They do, and they always did. refresh_cache(l_owner_name); Is responsible for doing the check and cache refresh. |
It's not working. |
I can have a look at this in the evening. |
@jgebal Why have you reopened this issue? |
Because we're discussing it and As you said, you might need to revert the change. |
Ok, I checked it again. |
In the preferences you can configure if you want to check for the availability of the menu option "Run utPLSQL test". When set, the extension enables the menu option only when at least one test has been found. This may be slow for two reasons:
because the annotation cache needs to be updated
this happens only, if you do not use a DDL trigger to track changes, in this case changes are detected delayed, when running a test or when checking for availability of tests
large schemas
there is more data in the annotation cache and in the data dictionary, affecting the runtime performance of the queries, especially when no DDL trigger is in place, due to delayed annotation detection
Since version 3.1.8 the following functions are available in
ut_runner
:has_suites
is_suite
is_test
These functions are optimized for performance and are faster than the generic table function
get_suites_info
. Hence these functions should be used whenever possible by the SQL Developer extension.In fact these functions are available since utPLSQL version 3.1.3, but since version 3.1.8 they are considered reliable (see also utPLSQL/utPLSQL#976). Hence the use of this functions should be limited to utPLSQL version 3.1.8 and higher.
The text was updated successfully, but these errors were encountered: