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

5719 - Adding Stacktrace to thrown #6029

Merged

Conversation

MessageMap
Copy link
Contributor

this commit fixes #5719
New Stacktrace with thrown is:

===> Running Common Test suites...
%%% db_data_type_SUITE: 
%%% db_data_type_SUITE ==> init_per_suite: FAILED
%%% db_data_type_SUITE ==> {thrown,
    {foo,
        [{db_data_type_SUITE,init_per_suite,1,
             [{file,
                  "/home/adamsbd/src/infratracks/common_tests/db_data_type_SUITE.erl"},
              {line,44}]},
         {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
         {test_server,run_test_case_eval1,6,
             [{file,"test_server.erl"},{line,1379}]},
         {test_server,run_test_case_eval,9,
             [{file,"test_server.erl"},{line,1223}]}]}}

no change to without Thrown and Normal Error:

===> Running Common Test suites...                                                                                                          
%%% db_data_type_SUITE:                                               
%%% db_data_type_SUITE ==> init_per_suite: FAILED
%%% db_data_type_SUITE ==> {undef,[{db,connect,["DSN=sqlserver;UID=alladin;PWD=sesame",[]],[]},
        {db_data_type_SUITE,init_per_suite,1,
                            [{file,"/home/adamsbd/src/infratracks/common_tests/db_data_type_SUITE.erl"},
                             {line,43}]},
        {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
        {test_server,run_test_case_eval1,6,
                     [{file,"test_server.erl"},{line,1379}]},
        {test_server,run_test_case_eval,9,
                     [{file,"test_server.erl"},{line,1223}]}]}

@CLAassistant
Copy link

CLAassistant commented May 29, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

github-actions bot commented May 29, 2022

CT Test Results

    2 files    58 suites   1h 18m 27s ⏱️
431 tests 413 ✔️ 18 💤 0
454 runs  432 ✔️ 22 💤 0

Results for commit 8bd699b.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@rickard-green rickard-green added the team:PS Assigned to OTP team PS label May 29, 2022
@IngelaAndin
Copy link
Contributor

You need to change the test case to reflect the new behavior:

{{badmatch,
     {event_not_found,
         {ct_test_support_eh,tc_done,
             {lib_error_1_SUITE,lines_throw,
                 {failed,{error,{thrown,catch_me_if_u_can}}}}}}},
 [{ct_error_SUITE,lib_error,1,[{file,"ct_error_SUITE.erl"},{line,136}]},
  {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
  {test_server,run_test_case_eval1,6,[{file,"test_server.erl"},{line,1291}]},
  {test_server,run_test_case_eval,9,[{file,"test_server.erl"},{line,1223}]}]}

@IngelaAndin IngelaAndin self-assigned this Jun 1, 2022
@MessageMap
Copy link
Contributor Author

Updated ... was going down a rabbit hole of how to exclude the content of the stacktrace

@MessageMap
Copy link
Contributor Author

MessageMap commented Jun 1, 2022

Changed the validation to not hard coded the the value of the stack trace: https://github.com/erlang/otp/pull/6029/files#diff-539120c7eb2fd386287985533ae198bc22aa46cbaa5e780f61a76b602cbaf8fdR1220

Removes the issue of line numbers changing in the stack trace.

Being first commit to erlang/OTP, took some learning. Apologize for any trouble. Let me know if anything else is needed.

Thank you

@MessageMap MessageMap force-pushed the 5719_CommonTest_eating_stacktraces branch from 23eb1ef to 19b88d0 Compare June 1, 2022 17:27
 - For Common_tests: Added to Match Results for thrown and not hard coded to Content of stacktrace
@MessageMap MessageMap force-pushed the 5719_CommonTest_eating_stacktraces branch from 19b88d0 to 8bd699b Compare June 1, 2022 17:33
@IngelaAndin IngelaAndin added the testing currently being tested, tag is used by OTP internal CI label Jun 2, 2022
@IngelaAndin IngelaAndin merged commit bf35783 into erlang:maint Jun 9, 2022
@IngelaAndin
Copy link
Contributor

It is good now, thank you for the PR.

@MessageMap MessageMap deleted the 5719_CommonTest_eating_stacktraces branch July 13, 2022 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants