You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running tests from UT3 user in other schema corrupts annotation cache #1051
We are setting up utPLSQL as a test framework for our database. We are initiating tests from TeamCity using utplsql-cli.
We have installed utPLSQL using the global DDL trigger approach. There might be situations where the annotation cache is not up to date or otherwise broken. Ref [/issues/1018].
It would be great to have a command-line switch for forcing a rebuild of the annotation cache.
During nightly test runs, we can then use this switch to ensure that the cache is valid.
You should not need this switch if you're using version 3.1.10 or above.
There are quite some improvements to how cache is handled in that version.
Can you try it out and report if you're really facing issues?
I found that what is clearing the cache is that I used the UT3 user when initiating the tests. Hopefully, I will not see this issue again when using another user.
Yes. UT3 user is "special".
It is framework owner schema.
I'll see if there is any way not to rely on it being special.
I think i know what is causing the problem.
Running tests from a different account shoyld solve your issues.
changed the title [-]Switch for forcing rebuild of annotation cache[/-][+]Running tests from UT3 user in other schema corrupts annotation cache[/+]on Mar 10, 2020
@hkorsvoll - can you provide me simple steps to reproduce the issue? It would greatly help with writing automated test for it to prove that the fix works and prevent regression.
The way utPLSQL was detecting if user has execute any procedure was implemented in a naive/silly way.
I'm hoping the issue will now be fixed, just need to figure a way to write an automated test for it.
Alternatively I could ask you to try out the version with fix.
I would prefer steps to reproduce though.
Hi, I just have to say what a pleasant experience it is to deal with a well functioning open-source community :)
Thank you for the quick response and the professionality you are showing.
@hkorsvoll
By default, when installing the UT3 user doesn't have execute any procedure privilege and so it will not be able to run any tests from other schema.
From what I understand, the issue was related to the fact that the annotation cache got corrupted/purged somehow.
I've tried reproducing the steps on my local 12.1 instance.
install utPLSQL 3.1.10 using all defaults with script install_headless_with_trigger.sql
Run script as DBA
createuserother_user identified by other_user;
grant connect, resource, create procedure to other_user;
createusertester identified by tester;
grant connect, resource, create procedure to tester;
Run below as tester
create or replacefunctionbetwnstr( a_string varchar2, a_start_pos integer, a_end_pos integer ) return varchar2 is
l_start_pos pls_integer := a_start_pos;
begin
if l_start_pos =0 then
l_start_pos :=1;
end if;
return substr( a_string, l_start_pos, a_end_pos - l_start_pos +1);
end;
/
create or replace package test_betwnstr as-- %suite(Between string function)-- %test(Returns substring from start position to end position)
procedure normal_case;
end;
/
create or replace package body test_betwnstr as
procedure normal_case is
beginut.expect( betwnstr( '1234567', 2, 5 ) ).to_equal('2345');
end;
end;
/grant execute on test_betwnstr to other_user;
Run the test as tester with: call ut.run('tester.test_betwnstr'); and get results:
Between string function
Returns substring from start position to end position [.003 sec]
Finished in .004702 seconds
1 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)
Run the test as other_user with: call ut.run('tester.test_betwnstr'); and get results:
Between string function
Returns substring from start position to end position [.003 sec]
Finished in .0015582 seconds
1 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)
Run the test as ut3 with: call ut.run('tester.test_betwnstr'); and get errors:
ORA-20204: Suite package tester.test_betwnstr does not exist
ORA-06512: at "UT3.UT_RUNNER", line 180
ORA-06512: at "UT3.UT", line 134
ORA-06512: at "UT3.UT", line 488
ORA-06512: at "UT3.UT", line 623
ORA-06512: at line 1 Position: 5
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 566
ORA-06512: at "UT3.UT_RUNNER", line 167
ORA-20204: Suite package tester.test_betwnstr does not exist
Run the whole schema as ut3 with: call ut.run('tester'); and get no tests:
Returns substring from start position to end position
normal_case
Run the test as other_user with: call ut.run('tester.test_betwnstr'); and get results:
Between string function
Returns substring from start position to end position [.002 sec]
Finished in .003522 seconds
1 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)
I'm unable to reproduce the issue locally.
Is there anything you did differently? Can you help me identifying if there was something specific in your steps taken?
Tests are located in schema FELLES.
User for creating tests is EWOPD.
Here is the DDL for the UTP3 user:
-- Start of DDL Script for User UTP3-- Generated 12.03.2020 09:09:05 from EWOPD@DALE.TEST013CREATEUSERutp3
IDENTIFIED BY <Enter User Password Here>
DEFAULT TABLESPACE UTPLSQL
TEMPORARY TABLESPACE UTPLSQLTEMP
QUOTA UNLIMITED ON UTPLSQL
/GRANT ALTER SESSION TO utp3
/GRANT CREATE PROCEDURE TO utp3
/GRANT CREATE SEQUENCE TO utp3
/GRANT CREATE SESSION TO utp3
/GRANT CREATE SYNONYM TO utp3
/GRANT CREATE TABLE TO utp3
/GRANT CREATE TYPE TO utp3
/GRANT CREATE VIEW TO utp3
/GRANT EXECUTE ONsys.dbms_crypto TO utp3
/GRANT EXECUTE ONsys.dbms_crypto TO utp3
/GRANT EXECUTE ONsys.dbms_lock TO utp3
/GRANT EXECUTE ONsys.dbms_lock TO utp3
/-- End of DDL Script for User UTP3
This is the DDL for the user creating objects (I have removed references to our own schemas):
-- Start of DDL Script for User EWOPD-- Generated 12.03.2020 09:23:20 from EWOPD@DALE.TEST013CREATEUSERewopd
IDENTIFIED BY <Enter User Password Here>
DEFAULT TABLESPACE BRUKARDATA
TEMPORARY TABLESPACE BRUKARDATATEMP
/GRANT ADMINISTER ANY SQL TUNING SET TO ewopd
/GRANT ADMINISTER DATABASE TRIGGER TO ewopd
/GRANT ADMINISTER SQL TUNING SET TO ewopd
/GRANT ADVISOR TO ewopd
/GRANT ALTER ANY CLUSTER TO ewopd
/GRANT ALTER ANY DIMENSION TO ewopd
/GRANT ALTER ANY EVALUATION CONTEXT TO ewopd
/GRANT ALTER ANY INDEX TO ewopd
/GRANT ALTER ANY INDEXTYPE TO ewopd
/GRANT ALTER ANY LIBRARY TO ewopd
/GRANT ALTER ANY MATERIALIZED VIEW TO ewopd
/GRANT ALTER ANY OUTLINE TO ewopd
/GRANT ALTER ANY PROCEDURE TO ewopd
/GRANT ALTER ANY ROLE TO ewopd
/GRANT ALTER ANY RULE TO ewopd
/GRANT ALTER ANY RULE SET TO ewopd
/GRANT ALTER ANY SEQUENCE TO ewopd
/GRANT ALTER ANY SQL PROFILE TO ewopd
/GRANT ALTER ANY TABLE TO ewopd
/GRANT ALTER ANY TRIGGER TO ewopd
/GRANT ALTER ANY TYPE TO ewopd
/GRANT ALTER DATABASE TO ewopd
/GRANT ALTER PROFILE TO ewopd
/GRANT ALTER RESOURCE COST TO ewopd
/GRANT ALTER ROLLBACK SEGMENT TO ewopd
/GRANT ALTER SESSION TO ewopd
/GRANT ALTER SYSTEM TO ewopd
/GRANT ALTER TABLESPACE TO ewopd
/GRANT ALTER USER TO ewopd
/GRANT ANALYZE ANY TO ewopd
/GRANT AUDIT ANY TO ewopd
/GRANT AUDIT SYSTEM TO ewopd
/GRANT BACKUP ANY TABLE TO ewopd
/GRANT BECOME USER TO ewopd
/GRANT CHANGE NOTIFICATION TO ewopd
/GRANT COMMENT ANY TABLE TO ewopd
/GRANT CREATE ANY CLUSTER TO ewopd
/GRANT CREATE ANY CONTEXT TO ewopd
/GRANT CREATE ANY CREDENTIAL TO ewopd
/GRANT CREATE ANY DIMENSION TO ewopd
/GRANT CREATE ANY DIRECTORY TO ewopd
/GRANT CREATE ANY EVALUATION CONTEXT TO ewopd
/GRANT CREATE ANY INDEX TO ewopd
/GRANT CREATE ANY INDEXTYPE TO ewopd
/GRANT CREATE ANY JOB TO ewopd
/GRANT CREATE ANY LIBRARY TO ewopd
/GRANT CREATE ANY MATERIALIZED VIEW TO ewopd
/GRANT CREATE ANY OPERATOR TO ewopd
/GRANT CREATE ANY OUTLINE TO ewopd
/GRANT CREATE ANY PROCEDURE TO ewopd
/GRANT CREATE ANY RULE TO ewopd
/GRANT CREATE ANY RULE SET TO ewopd
/GRANT CREATE ANY SEQUENCE TO ewopd
/GRANT CREATE ANY SQL PROFILE TO ewopd
/GRANT CREATE ANY SYNONYM TO ewopd
/GRANT CREATE ANY TABLE TO ewopd
/GRANT CREATE ANY TRIGGER TO ewopd
/GRANT CREATE ANY TYPE TO ewopd
/GRANT CREATE ANY VIEW TO ewopd
/GRANT CREATE CLUSTER TO ewopd
/GRANT CREATE CREDENTIAL TO ewopd
/GRANT CREATE DATABASE LINK TO ewopd
/GRANT CREATE DIMENSION TO ewopd
/GRANT CREATE EVALUATION CONTEXT TO ewopd
/GRANT CREATE EXTERNAL JOB TO ewopd
/GRANT CREATE INDEXTYPE TO ewopd
/GRANT CREATE JOB TO ewopd
/GRANT CREATE LIBRARY TO ewopd
/GRANT CREATE MATERIALIZED VIEW TO ewopd
/GRANT CREATE OPERATOR TO ewopd
/GRANT CREATE PROCEDURE TO ewopd
/GRANT CREATE PROFILE TO ewopd
/GRANT CREATE PUBLIC DATABASE LINK TO ewopd
/GRANT CREATE PUBLIC SYNONYM TO ewopd
/GRANT CREATE ROLE TO ewopd
/GRANT CREATE ROLLBACK SEGMENT TO ewopd
/GRANT CREATE RULE TO ewopd
/GRANT CREATE RULE SET TO ewopd
/GRANT CREATE SEQUENCE TO ewopd
/GRANT CREATE SESSION TO ewopd
/GRANT CREATE SYNONYM TO ewopd
/GRANT CREATE TABLE TO ewopd
/GRANT CREATE TABLESPACE TO ewopd
/GRANT CREATE TRIGGER TO ewopd
/GRANT CREATE TYPE TO ewopd
/GRANT CREATE USER TO ewopd
/GRANT CREATE VIEW TO ewopd
/GRANT DEBUG ANY PROCEDURE TO ewopd
/GRANT DEBUG CONNECT SESSION TO ewopd
/GRANTDELETE ANY TABLE TO ewopd
/GRANT DEQUEUE ANY QUEUE TO ewopd
/GRANT DROP ANY CLUSTER TO ewopd
/GRANT DROP ANY DIMENSION TO ewopd
/GRANT DROP ANY DIRECTORY TO ewopd
/GRANT DROP ANY EVALUATION CONTEXT TO ewopd
/GRANT DROP ANY INDEX TO ewopd
/GRANT DROP ANY INDEXTYPE TO ewopd
/GRANT DROP ANY LIBRARY TO ewopd
/GRANT DROP ANY MATERIALIZED VIEW TO ewopd
/GRANT DROP ANY OPERATOR TO ewopd
/GRANT DROP ANY OUTLINE TO ewopd
/GRANT DROP ANY PROCEDURE TO ewopd
/GRANT DROP ANY ROLE TO ewopd
/GRANT DROP ANY RULE TO ewopd
/GRANT DROP ANY RULE SET TO ewopd
/GRANT DROP ANY SEQUENCE TO ewopd
/GRANT DROP ANY SQL PROFILE TO ewopd
/GRANT DROP ANY SYNONYM TO ewopd
/GRANT DROP ANY TABLE TO ewopd
/GRANT DROP ANY TRIGGER TO ewopd
/GRANT DROP ANY TYPE TO ewopd
/GRANT DROP ANY VIEW TO ewopd
/GRANT DROP PROFILE TO ewopd
/GRANT DROP PUBLIC DATABASE LINK TO ewopd
/GRANT DROP PUBLIC SYNONYM TO ewopd
/GRANT DROP ROLLBACK SEGMENT TO ewopd
/GRANT DROP TABLESPACE TO ewopd
/GRANT DROP USER TO ewopd
/GRANT ENQUEUE ANY QUEUE TO ewopd
/GRANT EXECUTE ANY CLASS TO ewopd
/GRANT EXECUTE ANY EVALUATION CONTEXT TO ewopd
/GRANT EXECUTE ANY INDEXTYPE TO ewopd
/GRANT EXECUTE ANY LIBRARY TO ewopd
/GRANT EXECUTE ANY OPERATOR TO ewopd
/GRANT EXECUTE ANY PROCEDURE TO ewopd
/GRANT EXECUTE ANY PROGRAM TO ewopd
/GRANT EXECUTE ANY RULE TO ewopd
/GRANT EXECUTE ANY RULE SET TO ewopd
/GRANT EXECUTE ANY TYPE TO ewopd
/GRANT EXPORT FULL DATABASE TO ewopd
/GRANT FLASHBACK ANY TABLE TO ewopd
/GRANT FORCE ANY TRANSACTION TO ewopd
/GRANT FORCE TRANSACTION TO ewopd
/GRANT GLOBAL QUERY REWRITE TO ewopd
/GRANTGRANT ANY OBJECT PRIVILEGE TO ewopd
/GRANTGRANT ANY PRIVILEGE TO ewopd
/GRANTGRANT ANY ROLE TO ewopd
/GRANT IMPORT FULL DATABASE TO ewopd
/GRANT INSERT ANY TABLE TO ewopd
/GRANT LOCK ANY TABLE TO ewopd
/GRANT LOGMINING TO ewopd
/GRANT MANAGE ANY FILE GROUP TO ewopd
/GRANT MANAGE ANY QUEUE TO ewopd
/GRANT MANAGE FILE GROUP TO ewopd
/GRANT MANAGE SCHEDULER TO ewopd
/GRANT MANAGE TABLESPACE TO ewopd
/GRANT MERGE ANY VIEW TO ewopd
/GRANTONCOMMIT REFRESH TO ewopd
/GRANT QUERY REWRITE TO ewopd
/GRANT READ ANY FILE GROUP TO ewopd
/GRANT RESTRICTED SESSION TO ewopd
/GRANT RESUMABLE TO ewopd
/GRANTSELECT ANY SEQUENCE TO ewopd
/GRANTSELECT ANY TABLE TO ewopd
/GRANTSELECT ANY TRANSACTION TO ewopd
/GRANT SYSDBA TO ewopd
/GRANT SYSOPER TO ewopd
/GRANT UNDER ANY TABLE TO ewopd
/GRANT UNDER ANY TYPE TO ewopd
/GRANT UNDER ANY VIEW TO ewopd
/GRANT UNLIMITED TABLESPACE TO ewopd
/GRANTUPDATE ANY TABLE TO ewopd
/GRANT AQ_ADMINISTRATOR_ROLE TO ewopd
/GRANT AQ_USER_ROLE TO ewopd
/GRANT AUTHENTICATEDUSER TO ewopd
/GRANT CONNECT TO ewopd
/GRANT CTXAPP TO ewopd
/GRANT DBA TO ewopd
/GRANT DELETE_CATALOG_ROLE TO ewopd
/GRANT EJBCLIENT TO ewopd
/GRANT EXECUTE_CATALOG_ROLE TO ewopd
/GRANT EXP_FULL_DATABASE TO ewopd
/GRANT GATHER_SYSTEM_STATISTICS TO ewopd
/GRANT GUIBRUKAR TO ewopd
/GRANT HS_ADMIN_ROLE TO ewopd
/GRANT IMP_FULL_DATABASE TO ewopd
/GRANT JAVADEBUGPRIV TO ewopd
/GRANT JAVAIDPRIV TO ewopd
/GRANT JAVASYSPRIV TO ewopd
/GRANT JAVAUSERPRIV TO ewopd
/GRANT JAVA_ADMIN TO ewopd
/GRANT JAVA_DEPLOY TO ewopd
/GRANT LOGSTDBY_ADMINISTRATOR TO ewopd
/GRANT OEM_ADVISOR TO ewopd
/GRANT OEM_MONITOR TO ewopd
/GRANT RECOVERY_CATALOG_OWNER TO ewopd
/GRANT RESOURCE TO ewopd
/GRANT SCHEDULER_ADMIN TO ewopd
/GRANT SELECT_CATALOG_ROLE TO ewopd
/GRANT XDBADMIN TO ewopd
/ALTERUSER ewopd DEFAULT ROLE ALL
/GRANT DEBUG ONsys.dba_indexes TO ewopd
/GRANTDELETEONsys.dba_indexes TO ewopd
/GRANT FLASHBACK ONsys.dba_indexes TO ewopd
/GRANT INSERT ONsys.dba_indexes TO ewopd
/GRANT MERGE VIEW ONsys.dba_indexes TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_indexes TO ewopd
/GRANT QUERY REWRITE ONsys.dba_indexes TO ewopd
/GRANTREFERENCESONsys.dba_indexes TO ewopd
/GRANTSELECTONsys.dba_indexes TO ewopd
/GRANTUPDATEONsys.dba_indexes TO ewopd
/GRANT DEBUG ONsys.dba_jobs TO ewopd
/GRANTDELETEONsys.dba_jobs TO ewopd
/GRANT FLASHBACK ONsys.dba_jobs TO ewopd
/GRANT INSERT ONsys.dba_jobs TO ewopd
/GRANT MERGE VIEW ONsys.dba_jobs TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_jobs TO ewopd
/GRANT QUERY REWRITE ONsys.dba_jobs TO ewopd
/GRANTREFERENCESONsys.dba_jobs TO ewopd
/GRANTSELECTONsys.dba_jobs TO ewopd
/GRANTUPDATEONsys.dba_jobs TO ewopd
/GRANTSELECTONsys.dba_jobs_running TO ewopd
/GRANTSELECTONsys.dba_role_privs TO ewopd
/GRANT DEBUG ONsys.dba_scheduler_jobs TO ewopd
/GRANTDELETEONsys.dba_scheduler_jobs TO ewopd
/GRANT FLASHBACK ONsys.dba_scheduler_jobs TO ewopd
/GRANT INSERT ONsys.dba_scheduler_jobs TO ewopd
/GRANT MERGE VIEW ONsys.dba_scheduler_jobs TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_scheduler_jobs TO ewopd
/GRANT QUERY REWRITE ONsys.dba_scheduler_jobs TO ewopd
/GRANTREFERENCESONsys.dba_scheduler_jobs TO ewopd
/GRANTSELECTONsys.dba_scheduler_jobs TO ewopd
/GRANTUPDATEONsys.dba_scheduler_jobs TO ewopd
/GRANT DEBUG ONsys.dba_scheduler_job_classes TO ewopd
/GRANTDELETEONsys.dba_scheduler_job_classes TO ewopd
/GRANT FLASHBACK ONsys.dba_scheduler_job_classes TO ewopd
/GRANT INSERT ONsys.dba_scheduler_job_classes TO ewopd
/GRANT MERGE VIEW ONsys.dba_scheduler_job_classes TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_scheduler_job_classes TO ewopd
/GRANT QUERY REWRITE ONsys.dba_scheduler_job_classes TO ewopd
/GRANTREFERENCESONsys.dba_scheduler_job_classes TO ewopd
/GRANTSELECTONsys.dba_scheduler_job_classes TO ewopd
/GRANTUPDATEONsys.dba_scheduler_job_classes TO ewopd
/GRANT DEBUG ONsys.dba_scheduler_job_log TO ewopd
/GRANTDELETEONsys.dba_scheduler_job_log TO ewopd
/GRANT FLASHBACK ONsys.dba_scheduler_job_log TO ewopd
/GRANT INSERT ONsys.dba_scheduler_job_log TO ewopd
/GRANT MERGE VIEW ONsys.dba_scheduler_job_log TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_scheduler_job_log TO ewopd
/GRANT QUERY REWRITE ONsys.dba_scheduler_job_log TO ewopd
/GRANTREFERENCESONsys.dba_scheduler_job_log TO ewopd
/GRANTSELECTONsys.dba_scheduler_job_log TO ewopd
/GRANTUPDATEONsys.dba_scheduler_job_log TO ewopd
/GRANT DEBUG ONsys.dba_scheduler_job_run_details TO ewopd
/GRANTDELETEONsys.dba_scheduler_job_run_details TO ewopd
/GRANT FLASHBACK ONsys.dba_scheduler_job_run_details TO ewopd
/GRANT INSERT ONsys.dba_scheduler_job_run_details TO ewopd
/GRANT MERGE VIEW ONsys.dba_scheduler_job_run_details TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_scheduler_job_run_details TO ewopd
/GRANT QUERY REWRITE ONsys.dba_scheduler_job_run_details TO ewopd
/GRANTREFERENCESONsys.dba_scheduler_job_run_details TO ewopd
/GRANTSELECTONsys.dba_scheduler_job_run_details TO ewopd
/GRANTUPDATEONsys.dba_scheduler_job_run_details TO ewopd
/GRANT DEBUG ONsys.dba_scheduler_running_jobs TO ewopd
/GRANTDELETEONsys.dba_scheduler_running_jobs TO ewopd
/GRANT FLASHBACK ONsys.dba_scheduler_running_jobs TO ewopd
/GRANT INSERT ONsys.dba_scheduler_running_jobs TO ewopd
/GRANT MERGE VIEW ONsys.dba_scheduler_running_jobs TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_scheduler_running_jobs TO ewopd
/GRANT QUERY REWRITE ONsys.dba_scheduler_running_jobs TO ewopd
/GRANTREFERENCESONsys.dba_scheduler_running_jobs TO ewopd
/GRANTSELECTONsys.dba_scheduler_running_jobs TO ewopd
/GRANTUPDATEONsys.dba_scheduler_running_jobs TO ewopd
/GRANT DEBUG ONsys.dba_scheduler_schedules TO ewopd
/GRANTDELETEONsys.dba_scheduler_schedules TO ewopd
/GRANT FLASHBACK ONsys.dba_scheduler_schedules TO ewopd
/GRANT INSERT ONsys.dba_scheduler_schedules TO ewopd
/GRANT MERGE VIEW ONsys.dba_scheduler_schedules TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_scheduler_schedules TO ewopd
/GRANT QUERY REWRITE ONsys.dba_scheduler_schedules TO ewopd
/GRANTREFERENCESONsys.dba_scheduler_schedules TO ewopd
/GRANTSELECTONsys.dba_scheduler_schedules TO ewopd
/GRANTUPDATEONsys.dba_scheduler_schedules TO ewopd
/GRANTSELECTONsys.dba_sys_privs TO ewopd
/GRANT DEBUG ONsys.dba_tables TO ewopd
/GRANTDELETEONsys.dba_tables TO ewopd
/GRANT FLASHBACK ONsys.dba_tables TO ewopd
/GRANT INSERT ONsys.dba_tables TO ewopd
/GRANT MERGE VIEW ONsys.dba_tables TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_tables TO ewopd
/GRANT QUERY REWRITE ONsys.dba_tables TO ewopd
/GRANTREFERENCESONsys.dba_tables TO ewopd
/GRANTSELECTONsys.dba_tables TO ewopd
/GRANTUPDATEONsys.dba_tables TO ewopd
/GRANT DEBUG ONsys.dba_tab_columns TO ewopd
/GRANTDELETEONsys.dba_tab_columns TO ewopd
/GRANT FLASHBACK ONsys.dba_tab_columns TO ewopd
/GRANT INSERT ONsys.dba_tab_columns TO ewopd
/GRANT MERGE VIEW ONsys.dba_tab_columns TO ewopd
/GRANTONCOMMIT REFRESH ONsys.dba_tab_columns TO ewopd
/GRANT QUERY REWRITE ONsys.dba_tab_columns TO ewopd
/GRANTREFERENCESONsys.dba_tab_columns TO ewopd
/GRANTSELECTONsys.dba_tab_columns TO ewopd
/GRANTUPDATEONsys.dba_tab_columns TO ewopd
/GRANTSELECTONsys.dba_tab_privs TO ewopd
/GRANT DEBUG ONsys.dbms_alert TO ewopd
/GRANT DEBUG ONsys.dbms_alert TO ewopd
/GRANT EXECUTE ONsys.dbms_alert TO ewopd
/GRANT EXECUTE ONsys.dbms_alert TO ewopd
/GRANT EXECUTE ONsys.dbms_aq TO ewopd
/GRANT EXECUTE ONsys.dbms_aq TO ewopd
/GRANT EXECUTE ONsys.dbms_ijob TO ewopd
/GRANT EXECUTE ONsys.dbms_ijob TO ewopd
/GRANT EXECUTE ONsys.dbms_job TO ewopd
/GRANT EXECUTE ONsys.dbms_job TO ewopd
/GRANT EXECUTE ONsys.dbms_lock TO ewopd
/GRANT EXECUTE ONsys.dbms_lock TO ewopd
/GRANT EXECUTE ONsys.dbms_pipe TO ewopd
/GRANT EXECUTE ONsys.dbms_pipe TO ewopd
/GRANT EXECUTE ONsys.utl_recomp TO ewopd
/GRANT EXECUTE ONsys.utl_recomp TO ewopd
/GRANT DEBUG ONsys.utl_xml TO ewopd
/GRANT DEBUG ONsys.utl_xml TO ewopd
/GRANT EXECUTE ONsys.utl_xml TO ewopd
/GRANT EXECUTE ONsys.utl_xml TO ewopd
/GRANTSELECTONsys.v_$database TO ewopd
/GRANTSELECTONsys.v_$mystat TO ewopd
/GRANT DEBUG ONsys.v_$parameter TO ewopd
/GRANTDELETEONsys.v_$parameter TO ewopd
/GRANT FLASHBACK ONsys.v_$parameter TO ewopd
/GRANT INSERT ONsys.v_$parameter TO ewopd
/GRANT MERGE VIEW ONsys.v_$parameter TO ewopd
/GRANTONCOMMIT REFRESH ONsys.v_$parameter TO ewopd
/GRANT QUERY REWRITE ONsys.v_$parameter TO ewopd
/GRANTREFERENCESONsys.v_$parameter TO ewopd
/GRANTSELECTONsys.v_$parameter TO ewopd
/GRANTUPDATEONsys.v_$parameter TO ewopd
/GRANTSELECTONsys.v_$session TO ewopd
/GRANTSELECTONsys.v_$sesstat TO ewopd
/GRANTSELECTONsys.v_$statname TO ewopd
/GRANTSELECTONsystem.def$_aqcall TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.def$_aqcall TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.def$_calldest TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.def$_destination TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.def$_error TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.def$_lob TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.mview_evaluations TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.mview_exceptions TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.mview_filter TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.mview_filterinstance TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.mview_log TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.mview_recommendations TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.mview_workload TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.repcat$_repprop TO ewopd
WITH GRANT OPTION
/GRANTSELECTONsystem.repcat$_repschema TO ewopd
WITH GRANT OPTION
/-- End of DDL Script for User EWOPD
Here is spool from running tests as EWOPD:
**** SCRIPT STARTED Session: EWOPD@DALE.TEST013(3) 10.03.2020 13:53:51 ****
begin
ut.run('FELLES');
end;
==>
PL/SQL block executed
addresses
Address import testing
Import Address List [.094 sec]
Import Address List with BR [.078 sec]
Import Address List with summary [.063 sec]
Import Address List with UTF8 [.078 sec]
framework
Logg Framework testing
Debug logging [.015 sec]
Error logging [0 sec]
Fatal logging [0 sec]
Info logging [.016 sec]
Warn logging [0 sec]
CLOB logging [.11 sec]
Finished in .485 seconds
10 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)
--------------------------------------------------------------------------------
**** SCRIPT ENDED 10.03.2020 13:53:52 ****
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@hkorsvoll
Sorry for dry reply previously - I was replying from my mobile.
In v3.1.10 I did quite a bit of work to make cache more reliable and self-managed.
Those changes also addressed some uncovered bugs.
It seems that the issue you're reporting is no longer reproducible on v3.1.10.
To be sure, I'll give a try to your test scenario on both 3.1.10 and 3.1.9 and will get back to you with results.
If you could update to v3.1.10 and let me know if that solves your issues - that would be great too.
confirmed.
Issue occurs on 3.1.9
It does not occur anymore on 3.1.10
Even better.
If you simply uninstall 3.1.9 and install 3.1.10, all should start to work well.
Cache will get auto-populated on first run and so no manual refresh_cache is needed after upgrade/install of 3.1.10
No problem. I'm sorry I didn't check the version before. I specifically asked our DBA to install the latest version, and was quite confident we did have the latest one.
I asked our DBA to install it because I wanted to have a separate tablespace for the tool. I just thought that would be a good idea if utplsql store the test run history and we end up storing a lot of data in the schema. I don't know if there is any point doing this. Maybe you have some recommendations.
Anyway, I'll install the latest version as soon as I can.
utPLSQL v3 is DB-agnostic in a way that it doesn't store test results or test config in DB.
We have cache but it is there only for performance.
utPLSQL delegates test tracking to external, dedicated tools like Jenkins, Teamcity, Sonar etc.
utPLSQL config us fully embedded in test package spec and/or runtime parameters.
Thus is huge difference as opposed to previous incarnation (v2.x)
Activity
jgebal commentedon Mar 10, 2020
You should not need this switch if you're using version 3.1.10 or above.
There are quite some improvements to how cache is handled in that version.
Can you try it out and report if you're really facing issues?
hkorsvoll commentedon Mar 10, 2020
Look at my detailed comment in 1018 :-)
I found that what is clearing the cache is that I used the UT3 user when initiating the tests. Hopefully, I will not see this issue again when using another user.
jgebal commentedon Mar 10, 2020
Yes. UT3 user is "special".
It is framework owner schema.
I'll see if there is any way not to rely on it being special.
I think i know what is causing the problem.
Running tests from a different account shoyld solve your issues.
hkorsvoll commentedon Mar 10, 2020
Great, if you add this information in the Readme, you can close this issue :)
jgebal commentedon Mar 10, 2020
I will move that issue to utPLSQL main project as it is a framework issue, not utPLSQL-cli only.
jgebal commentedon Mar 10, 2020
I think it would be best to address the root cause and allow for test execution from UT3 user.
[-]Switch for forcing rebuild of annotation cache[/-][+]Running tests from UT3 user in other schema corrupts annotation cache[/+]jgebal commentedon Mar 10, 2020
@hkorsvoll - can you provide me simple steps to reproduce the issue? It would greatly help with writing automated test for it to prove that the fix works and prevent regression.
The way utPLSQL was detecting if user has
execute any procedurewas implemented in a naive/silly way.I'm hoping the issue will now be fixed, just need to figure a way to write an automated test for it.
Alternatively I could ask you to try out the version with fix.
I would prefer steps to reproduce though.
hkorsvoll commentedon Mar 11, 2020
Hi, I just have to say what a pleasant experience it is to deal with a well functioning open-source community :)
Thank you for the quick response and the professionality you are showing.
hkorsvoll commentedon Mar 11, 2020
Steps to reproduce.
jgebal commentedon Mar 11, 2020
@hkorsvoll
By default, when installing the
UT3user doesn't haveexecute any procedureprivilege and so it will not be able to run any tests from other schema.From what I understand, the issue was related to the fact that the annotation cache got corrupted/purged somehow.
I've tried reproducing the steps on my local 12.1 instance.
install_headless_with_trigger.sqltestertesterwith:call ut.run('tester.test_betwnstr');and get results:other_userwith:call ut.run('tester.test_betwnstr');and get results:ut3with:call ut.run('tester.test_betwnstr');and get errors:ut3with:call ut.run('tester');and get no tests:ut_annotation_cache_infotable to see if annotations are still in cache:Data is still there:
other_userwith:call ut.run('tester.test_betwnstr');and get results:I'm unable to reproduce the issue locally.
Is there anything you did differently? Can you help me identifying if there was something specific in your steps taken?
hkorsvoll commentedon Mar 12, 2020
Tests are located in schema FELLES.
User for creating tests is EWOPD.
Here is the DDL for the UTP3 user:
This is the DDL for the user creating objects (I have removed references to our own schemas):
Here is spool from running tests as EWOPD:
Here is spool from running tests as UTP3:
After this, there is no content in
utp3.ut_annotation.cacheRunning the tests again from EWOPD gives no tests:
jgebal commentedon Mar 12, 2020
Can you confirm version of utPLSQL youre on?
select ut.version() from dual;hkorsvoll commentedon Mar 12, 2020
jgebal commentedon Mar 12, 2020
Please update to 3.1.10
It's fixed there.
jgebal commentedon Mar 12, 2020
@hkorsvoll
Sorry for dry reply previously - I was replying from my mobile.
In v3.1.10 I did quite a bit of work to make cache more reliable and self-managed.
Those changes also addressed some uncovered bugs.
It seems that the issue you're reporting is no longer reproducible on v3.1.10.
To be sure, I'll give a try to your test scenario on both 3.1.10 and 3.1.9 and will get back to you with results.
If you could update to v3.1.10 and let me know if that solves your issues - that would be great too.
jgebal commentedon Mar 12, 2020
confirmed.
Issue occurs on 3.1.9
It does not occur anymore on 3.1.10
Even better.
If you simply uninstall 3.1.9 and install 3.1.10, all should start to work well.
Cache will get auto-populated on first run and so no manual refresh_cache is needed after upgrade/install of 3.1.10
hkorsvoll commentedon Mar 12, 2020
No problem. I'm sorry I didn't check the version before. I specifically asked our DBA to install the latest version, and was quite confident we did have the latest one.
I asked our DBA to install it because I wanted to have a separate tablespace for the tool. I just thought that would be a good idea if utplsql store the test run history and we end up storing a lot of data in the schema. I don't know if there is any point doing this. Maybe you have some recommendations.
Anyway, I'll install the latest version as soon as I can.
jgebal commentedon Mar 12, 2020
utPLSQL v3 is DB-agnostic in a way that it doesn't store test results or test config in DB.
We have cache but it is there only for performance.
utPLSQL delegates test tracking to external, dedicated tools like Jenkins, Teamcity, Sonar etc.
utPLSQL config us fully embedded in test package spec and/or runtime parameters.
Thus is huge difference as opposed to previous incarnation (v2.x)
Improved the way utPLSQL checks if user has the `execute any procedur…