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
utPLSQL CLI throwing multiple no_data_found [-01403] instead of passing test with --%throws(xxxx) #1280
I'm writing unit tests with --%throws() and they are passing in the schema, but when running through utPLSQL CLI [Jenkins plugin], I'm getting multiple no_data_found [-01403] errors and tests fail as "Actual: -1403 was expected to equal: -1400". Any ideas on how to tackle this?
I'm testing that the trigger will raise "can't insert null" [-1400] when trying to insert null into one of the columns [through null as param to one of the procedures].
The body is irrelevant, as I only insert null into one of the columns. There is no code after that.
Spec of UNIT_TEST_PKG [utility to help with common unit test features] is
E_CANT_INSERT_NULL EXCEPTION; PRAGMA EXCEPTION_INIT( E_CANT_INSERT_NULL, -1400);
I also tried with E_CANT_INSERT_NULL CONSTANT NUMBER := -1400;
but got same result.
Test passes when running the UT.run() in the schema.
When running on Jenkins job on utPLSQL CLI, getting this error:
Actual: -1403 was expected to equal: -1400
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01403: no data found
ORA-01400: cannot insert NULL into ("XXX"."YYY"."EMAIL_OPT_OUT")
ORA-06512: at "XXX.YYY", line 243
ORA-04088: error during execution of trigger 'XXX.YYY_AUD_TRG'
ORA-06512: at "XXX.YYY_AUD_TRG", line 243
ORA-06512: at line 6
So, the right error is raised during the execution of the trigger "ORA-01400: cannot insert NULL into ...", but then multiple no_data_found are triggered and final errorstack error is "ORA-01403: no data found", which causes the test to fail. I think all the no_data_found are coming from utPLSQL CLI, but I don't know how to deal with this.
Hi Marcin
Long time :)
I'm on holiday till 28th however can you please verify the same test using utplsqlcli on local machine rather than via Jenkins plugin to make sure you running latest version.
Also I believe there is an parameter to execute with debug log info so we can see what's going on.
Cheers Lukasz
Can you check and confirm that both jenkins and local execution of tests are done with the same database user?
When running on jenkins is the db user used to connect slso the owner of the test packages and owner of the UNIT_TEST_PKG?
Full steps to reproduced will help us pinpoint the proboem
My suspicion is that the user used to run the tests on jenkins is not test owner while it is test owner when running locally.
@m-jerwan
It is most likely related to a different issue #1223
The reason why you see the problem in Jenkins is that the test run in jenkins is invoked from a different user.
Activity
lwasylow commentedon Jul 18, 2024
Hi Marcin
Long time :)
I'm on holiday till 28th however can you please verify the same test using utplsqlcli on local machine rather than via Jenkins plugin to make sure you running latest version.
Also I believe there is an parameter to execute with debug log info so we can see what's going on.
Cheers Lukasz
jgebal commentedon Jul 18, 2024
Can you check and confirm that both jenkins and local execution of tests are done with the same database user?
When running on jenkins is the db user used to connect slso the owner of the test packages and owner of the UNIT_TEST_PKG?
Full steps to reproduced will help us pinpoint the proboem
My suspicion is that the user used to run the tests on jenkins is not test owner while it is test owner when running locally.
lwasylow commentedon Apr 3, 2025
Hi @m-jerwan
Is this still relevant or can be closed?
jgebal commentedon May 9, 2026
@m-jerwan
It is most likely related to a different issue #1223
The reason why you see the problem in Jenkins is that the test run in jenkins is invoked from a different user.