-
Notifications
You must be signed in to change notification settings - Fork 17
Plugin should only generate procedure test for procedures with test anotation #59
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
Hello @tkleiber. First of all thank you for taking the time to report the issue. An editor or worksheet can have different states. The main ones are:
When the editor is connected, the SQL Developer extension can ask the utPLSQL annotation API, if a procedure is a known test. Only test procedures can be chosen for execution. However, when the editor is not connected, then the logic applies as you have described it. You may argue that for the package specification the extension could still find out what to run, but in this case we would have to reimplement what the utPLSQL core already does, and we'd like to avoid that. But that's not possible for a package body. I hope this explains the current behaviour. Thanks, |
My package editor is connected. I think you missunderstood my problem, so I will summarize it here again. The first procedure, which is found after the package declaration (run the test from line of the example) is annotated not with %test but with %beforeeach or with %aftereach. Your plugin seems not to make an difference between the annotations, and if the user does not check the generated code immediatly he search long for the root cause of this error:
` ORA-20204: Suite test DEMO.test_betwnstr.setup does not exist Error starting at line : 2 in command - See the example package here: test_betwnstr.zip |
Thank you @tkleiber for the clarification. - Now I can reproduce the problem. I will analyze it later. |
Issue happens only when in the Preferences the In this case, the annotation API should be called, even on large schemas. It might lead to a delay until the test is started, but this should be acceptable for most cases. However, when the annotation cache is empty, the start of the test might be delayed for a very long time (minutes). With the current behaviour it is clear, that the anonymous block in the newly opened worksheet is responsible for the delay. When changing it we have to inform the user somehow that the annotation API is read, so that it is clear that the SQL Developer session is doing something in the background. Maybe we should introduce an additional option in the preferences such as So I consider this still a bug. - I'd go with the easiest option for now. Reading the annotation API. Even on large schemas. |
FIX #59 - always determine executable tests via annotation API before executing tests
It seems, that the plugin generate procedure calls from the editor if I'm after the first line (where the package name is) for the next found procedure definition.
If this has not a test annotation this leads to annoying errors, see
utPLSQL/utPLSQL#884
I think it should only generate a procedure test, when I'm on a procedure with a test anotation and else the package test.
The text was updated successfully, but these errors were encountered: