Skip to content
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

11 tests owned by "ut3_tester" fail when executed as "ut3_tester" #969

Closed
PhilippSalvisberg opened this issue Jul 5, 2019 · 0 comments
Closed
Labels
bug
Milestone

Comments

@PhilippSalvisberg
Copy link
Member

@PhilippSalvisberg PhilippSalvisberg commented Jul 5, 2019

Describe the bug

I expect that the owner of tests can execute its tests successfully. And if this is not the case the tests should throw an appropriate exception (e.g. must be executed as ut3_tester_helper) or it should be disabled dynamically.

Provide version info

19.0.0.0.0
19.0.0


PL/SQL procedure successfully completed.


UT_VERSION                                                  
------------------------------------------------------------
v3.1.8.3142-develop


BANNER                                                                           BANNER_FULL                                                                                                                                                      BANNER_LEGACY                                                                        CON_ID
-------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production           Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production                                                                                           Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production                    0
                                                                                 Version 19.2.0.0.0                                                                                                                                                                                                                                          



PARAMETER                      VALUE                                                           
------------------------------ ----------------------------------------------------------------
NLS_LANGUAGE                   ENGLISH                                                         
NLS_TERRITORY                  SWITZERLAND                                                     
NLS_CURRENCY                   SFr.                                                            
NLS_ISO_CURRENCY               SWITZERLAND                                                     
NLS_NUMERIC_CHARACTERS         .'                                                              
NLS_CALENDAR                   GREGORIAN                                                       
NLS_DATE_FORMAT                DD.MM.YYYY HH24:MI:SS                                           
NLS_DATE_LANGUAGE              ENGLISH                                                         
NLS_SORT                       BINARY                                                          
NLS_TIME_FORMAT                HH24:MI:SSXFF                                                   
NLS_TIMESTAMP_FORMAT           DD.MM.RR HH24:MI:SSXFF                                          

PARAMETER                      VALUE                                                           
------------------------------ ----------------------------------------------------------------
NLS_TIME_TZ_FORMAT             HH24:MI:SSXFF TZR                                               
NLS_TIMESTAMP_TZ_FORMAT        DD.MM.RR HH24:MI:SSXFF TZR                                      
NLS_DUAL_CURRENCY              SF                                                              
NLS_COMP                       BINARY                                                          
NLS_LENGTH_SEMANTICS           BYTE                                                            
NLS_NCHAR_CONV_EXCP            FALSE                                                           

17 rows selected. 


PORT_STRING                                                 
------------------------------------------------------------
x86_64/Linux 2.4.xx

Information about client software

irrelevant.

To Reproduce

  1. connect as user ut3_tester in a current development environment

  2. run the the follwing:

SET SERVEROUTPUT ON SIZE UNLIMITED
EXECUTE ut.run('UT3_TESTER');
  1. Look at the output:
Failures:
 
   1) after_each_executed
      Actual: 3 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTER_EACH_EXECUTED", line 160 ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success);
      
       
      Actual: 0 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTER_EACH_EXECUTED", line 161 ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1);
      
       
   2) before_each_executed
      Actual: 3 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFORE_EACH_EXECUTED", line 332 ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success);
      
       
      Actual: NULL (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFORE_EACH_EXECUTED", line 333 ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1);
      
       
   3) before_test_executed
      Actual: 3 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFORE_TEST_EXECUTED", line 536 ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success);
      
       
      Actual: NULL (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFORE_TEST_EXECUTED", line 537 ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1);
      
       
   4) after_test_executed
      Actual: 3 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTER_TEST_EXECUTED", line 591 ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success);
      
       
      Actual: 0 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTER_TEST_EXECUTED", line 592 ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1);
      
       
   5) disabled_test
      Actual: NULL (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.DISABLED_TEST", line 25 ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1);
      
       
      Actual: 3 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.DISABLED_TEST", line 26 ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_success);
      
       
      Actual: 0 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.DISABLED_TEST", line 27 ut.expect(l_suite.results_count.disabled_count).to_equal(1);
      
       
      Actual: 0 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.DISABLED_TEST", line 29 ut.expect(l_suite.results_count.success_count).to_equal(1);
      
       
      Actual: 2 (number) was expected to equal: 0 (number) 
      at "UT3_TESTER.TEST_UT_TEST.DISABLED_TEST", line 31 ut.expect(l_suite.results_count.errored_count).to_equal(0);
      
       
   6) aftertest_errors
      Actual: NULL (number) was expected to equal: 3 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTERTEST_ERRORS", line 53 ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(3);
      
       
      Actual: 0 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTERTEST_ERRORS", line 57 ut.expect(l_suite.results_count.success_count).to_equal(1);
      
       
      Actual: 2 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTERTEST_ERRORS", line 59 ut.expect(l_suite.results_count.errored_count).to_equal(1);
      
       
   7) aftereach_errors
      Actual: NULL (number) was expected to equal: 3 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTEREACH_ERRORS", line 79 ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(3);
      
       
      Actual: 0 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTEREACH_ERRORS", line 83 ut.expect(l_suite.results_count.success_count).to_equal(1);
      
       
      Actual: 2 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.AFTEREACH_ERRORS", line 85 ut.expect(l_suite.results_count.errored_count).to_equal(1);
      
       
   8) beforetest_errors
      Actual: NULL (number) was expected to equal: 2 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFORETEST_ERRORS", line 105 ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(2);
      
       
      Actual: 0 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFORETEST_ERRORS", line 109 ut.expect(l_suite.results_count.success_count).to_equal(1);
      
       
      Actual: 2 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFORETEST_ERRORS", line 111 ut.expect(l_suite.results_count.errored_count).to_equal(1);
      
       
   9) beforeeach_errors
      Actual: NULL (number) was expected to equal: 2 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFOREEACH_ERRORS", line 131 ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(2);
      
       
      Actual: 0 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFOREEACH_ERRORS", line 135 ut.expect(l_suite.results_count.success_count).to_equal(1);
      
       
      Actual: 2 (number) was expected to equal: 1 (number) 
      at "UT3_TESTER.TEST_UT_TEST.BEFOREEACH_ERRORS", line 137 ut.expect(l_suite.results_count.errored_count).to_equal(1);
      
       
  10) rollback_manual
      Actual: 0 (number) was expected to be greater than: 0 (number) 
      at "UT3_TESTER_HELPER.RUN_HELPER.TEST_ROLLBACK_TYPE", line 556 ut.expect(main_helper.get_value(q'[ut_transaction_control.count_rows('t')]')).to_( a_expectation );
      
       
      Actual: 0 (number) was expected to be greater than: 0 (number) 
      at "UT3_TESTER_HELPER.RUN_HELPER.TEST_ROLLBACK_TYPE", line 557 ut.expect(main_helper.get_value(q'[ut_transaction_control.count_rows('s')]')).to_( a_expectation );
      
       
  11) rollback_manual_on_failure
      Actual: 0 (number) was expected to be greater than: 0 (number) 
      at "UT3_TESTER_HELPER.RUN_HELPER.TEST_ROLLBACK_TYPE", line 556 ut.expect(main_helper.get_value(q'[ut_transaction_control.count_rows('t')]')).to_( a_expectation );
      
       
      Actual: 0 (number) was expected to be greater than: 0 (number) 
      at "UT3_TESTER_HELPER.RUN_HELPER.TEST_ROLLBACK_TYPE", line 557 ut.expect(main_helper.get_value(q'[ut_transaction_control.count_rows('s')]')).to_( a_expectation );
      
       
Finished in 12.283786 seconds
233 tests, 11 failed, 0 errored, 1 disabled, 0 warning(s)
  1. connect as user ut3_tester_helper

  2. run the following (same as in step 3):

SET SERVEROUTPUT ON SIZE UNLIMITED
EXECUTE ut.run('UT3_TESTER');
  1. look at the ouput (no errors, excerpt):
Finished in 13.088981 seconds
233 tests, 0 failed, 0 errored, 1 disabled, 0 warning(s)

Expected behavior

  • Option 1: step 3 and 5 produced the same number of succeeded, failed, errored tests
  • Option 2: if option 1 is not feasible, this should be documented and reported in an sensible way, so that the user knows what to do (and maybe also why).
@PhilippSalvisberg PhilippSalvisberg changed the title 11 tests owned by `ut3_tester` fail when executed as `ut3_tester` 11 tests owned by "ut3_tester" fail when executed as "ut3_tester" Jul 5, 2019
jgebal added a commit that referenced this issue Nov 29, 2019
Resolves #969
@jgebal jgebal closed this in #1027 Nov 30, 2019
@jgebal jgebal added this to the 3.1.10 milestone Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.