Skip to content

Two ut packages with similar names cause issue #468

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
durrani opened this issue Aug 23, 2017 · 7 comments · Fixed by #469
Closed

Two ut packages with similar names cause issue #468

durrani opened this issue Aug 23, 2017 · 7 comments · Fixed by #469
Assignees
Labels

Comments

@durrani
Copy link

durrani commented Aug 23, 2017

I have two packages say: ut_name and ut_name_suffix

Issue 1:
exec ut.run('ut_name');

Actual:
This runs both packages.

Expected:
Run only ut_name

Issue 2:
Calling individual procedure within ut_name gives error

exec ut.run('ut_name.my_proc');

Actual:
ORA-06512: AT "UTPLSQL.UT_SUITE_MANAGER", line 442
ORA-06512: AT "UTPLSQL.UT_SUITE_MANAGER", line 432
ORA-06512: AT "UTPLSQL.UT_SUITE_MANAGER", line 432
ORA-06512: AT "UTPLSQL.UT_SUITE_MANAGER", line 545
ORA-06512: AT "UTPLSQL.UT_RUNNER", line 76

ORA-20203: Suite not found

Expected:
Runs the procedure my_proc under ut_name

@jgebal jgebal added the bug label Aug 24, 2017
@jgebal
Copy link
Member

jgebal commented Aug 24, 2017

Thanks for reporting it @durrani

@Pazus
Copy link
Member

Pazus commented Aug 26, 2017

Hi @durrani !
I can't reproduce it on develop branch.
What version do you use?

@jgebal
Copy link
Member

jgebal commented Aug 28, 2017

@Pazus
Did you try with 2 unit test packages: ut_name and ut_name_suffix without suitepath?
Can we simply add a test to confirm that this behavior is no longer there, when calling ut.run with test package name?

I've added #470, as the reported side-effect could actually be an interesting feature:
ut.run('test_package*'); could be giving the reported behavior - execute by part of package name.

@jgebal
Copy link
Member

jgebal commented Aug 28, 2017

@Pazus , @durrani, I also cannot reproduce the behavior using our develop branch.
Testcase:

create or replace package ut_test as
--%suite

--%test
procedure aa;
end;
/

create or replace package ut_test_suffix as
--%suite

--%test
procedure aa;
end;
/
exec ut.run('ut_test');
ut_test
  aa [.014 sec] (FAILED - 1)
 
Failures:
 
  1) aa
      ORA-04067: not executed, package body "UT3_TESTER.UT_TEST" does not exist
      ORA-06508: PL/SQL: could not find program unit being called: "UT3_TESTER.UT_TEST"
      ORA-06512: at line 6
Finished in .019856 seconds
1 tests, 0 failed, 1 errored, 0 disabled, 0 warning(s)

Only the ut_test was called.

There was however an issue when calling by suitepath - fixed by @Pazus

@durrani
Copy link
Author

durrani commented Aug 28, 2017

Sorry for late reply. Yes, I was also using suitepath. Thank you both.

@ghost ghost removed the in progress label Aug 28, 2017
@jgebal
Copy link
Member

jgebal commented Aug 31, 2017

@durrani you can now use v3.0.3 - fixed

@durrani
Copy link
Author

durrani commented Aug 31, 2017

Thank you very much @jgebal @Pazus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants