Code Monkey home page Code Monkey logo

Comments (4)

PhilippSalvisberg avatar PhilippSalvisberg commented on June 16, 2024

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:

  • Connected (a connection name is selected in the upper right corner of the editor window)
  • Not connected (no connection is selected in the upper right corner of the editor window)

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,
Philipp

from utplsql-sqldeveloper.

tkleiber avatar tkleiber commented on June 16, 2024

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:

EXECUTE ut.run('DEMO.test_betwnstr.setup');
And this gives following error:

`
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 680
ORA-06512: at "UT3.UT_RUNNER", line 150

ORA-20204: Suite test DEMO.test_betwnstr.setup does not exist
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 680

Error starting at line : 2 in command -
BEGIN ut.run('DEMO.test_betwnstr.setup'); END;
Error report -
ORA-20204: Suite test DEMO.test_betwnstr.setup does not exist
ORA-06512: at "UT3.UT_RUNNER", line 163
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 680
ORA-06512: at "UT3.UT_RUNNER", line 150
ORA-06512: at "UT3.UT", line 126
ORA-06512: at "UT3.UT", line 427
ORA-06512: at "UT3.UT", line 538
ORA-06512: at line 1
`

See the example package here: test_betwnstr.zip

from utplsql-sqldeveloper.

PhilippSalvisberg avatar PhilippSalvisberg commented on June 16, 2024

Thank you @tkleiber for the clarification. - Now I can reproduce the problem. I will analyze it later.

from utplsql-sqldeveloper.

PhilippSalvisberg avatar PhilippSalvisberg commented on June 16, 2024

Issue happens only when in the Preferences the Check availability of "Run utPLSQL test" menu option? is unchecked. In this case the behaviour of and connected and unconnected editor is the same. The utPL/SQL annotation API is never called.

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 use utPLSQL annotation API?.

So I consider this still a bug. - I'd go with the easiest option for now. Reading the annotation API. Even on large schemas.

from utplsql-sqldeveloper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.