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

Add unit tests for sub_chain_plugin #3

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

valthon
Copy link
Contributor

@valthon valthon commented Dec 9, 2024

No description provided.

@bearcubsvet bearcubsvet self-requested a review December 10, 2024 17:39
@valthon valthon force-pushed the sub_chain_unit_tests branch from b94f356 to 815fbc2 Compare December 10, 2024 20:46
@bearcubsvet
Copy link
Collaborator

from the first run I also saw those

Total Test time (real) = 6883.64 sec

The following tests FAILED:
	 36 - test_sub_chain (Failed)
	 94 - full-version-label-test (Failed)
	106 - nodeop_short_fork_take_over_lr_test (Failed)
	109 - nodeop_retry_transaction_lr_test (Failed)
	111 - larger_lib_test (Failed)
	113 - plugin_http_api_test (Failed)
	114 - resource_monitor_plugin_test (Failed)
	

reruning test_sub_chain after it rebuilds in a few minutes

@bearcubsvet
Copy link
Collaborator

bearcubsvet commented Dec 10, 2024

sub chain

    Start 36: test_sub_chain

36: Test command: /wire/wire-sysio/build/plugins/sub_chain_plugin/test/test_sub_chain
36: Test timeout computed to be: 1500
36: warn  2024-12-10T23:06:05.293 test_sub_ sub_chain_plugin.cpp:41       plugin_initialize    ] 3110006 plugin_config_exception: Incorrect plugin configuration
36: sub_chain_plugin requires both --s-chain-contract and --s-chain-actions to be set
36:     {}
36:     test_sub_chain  sub_chain_plugin.cpp:26 plugin_initialize
36: 
36: warn  2024-12-10T23:06:05.293 test_sub_ test_sub_chain.cpp:84         test_method          ] areallylongactionname
36: warn  2024-12-10T23:06:05.293 test_sub_ sub_chain_plugin.cpp:41       plugin_initialize    ] 3010001 name_type_exception: Invalid name
36: Name is longer than 13 characters (areallylongactionname) 
36:     {"name":"areallylongactionname"}
36:     test_sub_chain  name.cpp:11 set
36: 
36: warn  2024-12-10T23:06:05.293 test_sub_ test_sub_chain.cpp:84         test_method          ] bad,format
36: warn  2024-12-10T23:06:05.293 test_sub_ sub_chain_plugin.cpp:41       plugin_initialize    ] 3010001 name_type_exception: Invalid name
36: Name not properly normalized (name: bad,format, normalized: bad.format) 
36:     {"name":"bad,format","normalized":"bad.format"}
36:     test_sub_chain  name.cpp:13 set
36: 
36: warn  2024-12-10T23:06:05.293 test_sub_ test_sub_chain.cpp:84         test_method          ] bad format
36: warn  2024-12-10T23:06:05.293 test_sub_ sub_chain_plugin.cpp:41       plugin_initialize    ] 3010001 name_type_exception: Invalid name
36: Name not properly normalized (name: bad format, normalized: bad.format) 
36:     {"name":"bad format","normalized":"bad.format"}
36:     test_sub_chain  name.cpp:13 set
36: 
36: warn  2024-12-10T23:06:05.293 test_sub_ test_sub_chain.cpp:84         test_method          ] %^&*mat
36: warn  2024-12-10T23:06:05.293 test_sub_ sub_chain_plugin.cpp:41       plugin_initialize    ] 3010001 name_type_exception: Invalid name
36: Name not properly normalized (name: $%^&*mat, normalized: .....mat) 
36:     {"name":"$%^&*mat","normalized":".....mat"}
36:     test_sub_chain  name.cpp:13 set
36: 
36: warn  2024-12-10T23:06:05.293 test_sub_ sub_chain_plugin.cpp:41       plugin_initialize    ] 3010001 name_type_exception: Invalid name
36: Name not properly normalized (name: b,a,d, normalized: b.a.d) 
36:     {"name":"b,a,d","normalized":"b.a.d"}
36:     test_sub_chain  name.cpp:13 set
36: 
36: warn  2024-12-10T23:06:05.293 test_sub_ sub_chain_plugin.cpp:41       plugin_initialize    ] 3010001 name_type_exception: Invalid name
36: Name not properly normalized (name: brok en, normalized: brok.en) 
36:     {"name":"brok en","normalized":"brok.en"}
36:     test_sub_chain  name.cpp:13 set
36: 
36: info  2024-12-10T23:06:05.818 test_sub_ platform_timer_accurac:62     compute_and_print_ti ] Checktime timer accuracy: min:7us max:760us mean:15us stddev:16us
36: warn  2024-12-10T23:06:05.820 test_sub_ controller.cpp:600            startup              ] No existing chain state or fork database. Initializing fresh blockchain state and resetting fork database.
36: warn  2024-12-10T23:06:05.820 test_sub_ controller.cpp:453            initialize_blockchai ] Initializing new blockchain with genesis state
36: info  2024-12-10T23:06:05.825 test_sub_ controller.cpp:526            replay               ] no irreversible blocks need to be replayed
36: info  2024-12-10T23:06:05.826 test_sub_ controller.cpp:539            replay               ] 0 reversible blocks replayed
36: info  2024-12-10T23:06:05.826 test_sub_ controller.cpp:547            replay               ] replayed 0 blocks in 0 seconds, 0.00000000001071021 ms/block
36: warn  2024-12-10T23:06:05.855 test_sub_ controller.cpp:600            startup              ] No existing chain state or fork database. Initializing fresh blockchain state and resetting fork database.
36: warn  2024-12-10T23:06:05.855 test_sub_ controller.cpp:453            initialize_blockchai ] Initializing new blockchain with genesis state
36: info  2024-12-10T23:06:05.859 test_sub_ controller.cpp:526            replay               ] no irreversible blocks need to be replayed
36: info  2024-12-10T23:06:05.859 test_sub_ controller.cpp:539            replay               ] 0 reversible blocks replayed
36: info  2024-12-10T23:06:05.859 test_sub_ controller.cpp:547            replay               ] replayed 0 blocks in 0 seconds, 0.00000000000838190 ms/block
36: warn  2024-12-10T23:06:05.886 test_sub_ controller.cpp:600            startup              ] No existing chain state or fork database. Initializing fresh blockchain state and resetting fork database.
36: warn  2024-12-10T23:06:05.886 test_sub_ controller.cpp:453            initialize_blockchai ] Initializing new blockchain with genesis state
36: info  2024-12-10T23:06:05.891 test_sub_ controller.cpp:526            replay               ] no irreversible blocks need to be replayed
36: info  2024-12-10T23:06:05.891 test_sub_ controller.cpp:539            replay               ] 0 reversible blocks replayed
36: info  2024-12-10T23:06:05.891 test_sub_ controller.cpp:547            replay               ] replayed 0 blocks in 0 seconds, 0.00000000000745058 ms/block
36: info  2024-12-10T23:06:05.906 test_sub_ sub_chain_plugin.cpp:135      compute_curr_s_id    ] Computed interim S-ID: 5170d8f3c92a567342effe4fccc2d6a95a49e0116bdb1765e0333410b08938d8
36: info  2024-12-10T23:06:05.906 test_sub_ sub_chain_plugin.cpp:140      compute_curr_s_id    ] Extracted prev_s_block_number from prev_s_id: 0, next: 1
36: info  2024-12-10T23:06:05.906 test_sub_ controller.cpp:2870           set_s_header         ] Pending building block s_header set: 
36:     Contract Name:  fiona
36:     Previous S-ID:  0000000000000000000000000000000000000000000000000000000000000000
36:     Current S-ID:   00000001c92a567342effe4fccc2d6a95a49e0116bdb1765e0333410b08938d8
36:     Current S-Root: e8b25d9b347121155f4b04cdce5f9253baf573a223fa1e204208b0e56bed2d94
36:             and matches what was passed: true
36: info  2024-12-10T23:06:05.906 test_sub_ sub_chain_plugin.cpp:69       update_prev_s_id     ] Updating OLD prev_s_id:        0000000000000000000000000000000000000000000000000000000000000000
36: info  2024-12-10T23:06:05.906 test_sub_ sub_chain_plugin.cpp:71       update_prev_s_id     ] Updated  NEW prev_s_id:        00000001c92a567342effe4fccc2d6a95a49e0116bdb1765e0333410b08938d8
36: info  2024-12-10T23:06:05.906 test_sub_ controller.cpp:1710           finalize_block       ] s_header present in finalize block, adding to block header: 
36:     Contract Name:  fiona
36:     Previous S-ID:  0000000000000000000000000000000000000000000000000000000000000000
36:     Current S-ID:   00000001c92a567342effe4fccc2d6a95a49e0116bdb1765e0333410b08938d8
36:     Current S-Root: e8b25d9b347121155f4b04cdce5f9253baf573a223fa1e204208b0e56bed2d94
36: info  2024-12-10T23:06:05.907 test_sub_ sub_chain_plugin.cpp:135      compute_curr_s_id    ] Computed interim S-ID: 7975bf5ff270fc046e055a4e09be02ed581c1b34429cfc39cc1c07f474acdb6f
36: info  2024-12-10T23:06:05.907 test_sub_ sub_chain_plugin.cpp:140      compute_curr_s_id    ] Extracted prev_s_block_number from prev_s_id: 1, next: 2
36: info  2024-12-10T23:06:05.907 test_sub_ controller.cpp:2870           set_s_header         ] Pending building block s_header set: 
36:     Contract Name:  fiona
36:     Previous S-ID:  00000001c92a567342effe4fccc2d6a95a49e0116bdb1765e0333410b08938d8
36:     Current S-ID:   00000002f270fc046e055a4e09be02ed581c1b34429cfc39cc1c07f474acdb6f
36:     Current S-Root: 98255901feeaffd656369b775e5ab32d3870e4c753d828adde70df0d8cd6bb9d
36:             and matches what was passed: true
36: info  2024-12-10T23:06:05.907 test_sub_ sub_chain_plugin.cpp:69       update_prev_s_id     ] Updating OLD prev_s_id:        00000001c92a567342effe4fccc2d6a95a49e0116bdb1765e0333410b08938d8
36: info  2024-12-10T23:06:05.907 test_sub_ sub_chain_plugin.cpp:71       update_prev_s_id     ] Updated  NEW prev_s_id:        00000002f270fc046e055a4e09be02ed581c1b34429cfc39cc1c07f474acdb6f
36: info  2024-12-10T23:06:05.907 test_sub_ controller.cpp:1710           finalize_block       ] s_header present in finalize block, adding to block header: 
36:     Contract Name:  fiona
36:     Previous S-ID:  00000001c92a567342effe4fccc2d6a95a49e0116bdb1765e0333410b08938d8
36:     Current S-ID:   00000002f270fc046e055a4e09be02ed581c1b34429cfc39cc1c07f474acdb6f
36:     Current S-Root: 98255901feeaffd656369b775e5ab32d3870e4c753d828adde70df0d8cd6bb9d
36: Running 7 test cases...
36: 
36: *** No errors detected
36: 
1/1 Test #36: test_sub_chain ...................   Passed    0.64 sec

The following tests passed:
        test_sub_chain

100% tests passed, 0 tests failed out of 1

@jackatwire

    Start 106: nodeop_short_fork_take_over_lr_test
1/5 Test #106: nodeop_short_fork_take_over_lr_test ...   Passed  161.20 sec
    Start 109: nodeop_retry_transaction_lr_test
2/5 Test #109: nodeop_retry_transaction_lr_test ......   Passed  427.09 sec
    Start 111: larger_lib_test
3/5 Test #111: larger_lib_test .......................   Passed   75.15 sec
    Start 113: plugin_http_api_test
4/5 Test #113: plugin_http_api_test ..................***Failed   19.34 sec
    Start 114: resource_monitor_plugin_test
5/5 Test #114: resource_monitor_plugin_test ..........   Passed  805.79 sec

80% tests passed, 1 tests failed out of 5

Label Time Summary:
long_running_tests         = 1394.08 sec*proc (3 tests)
nonparallelizable_tests    =  94.49 sec*proc (2 tests)

Total Test time (real) = 1488.59 sec

The following tests FAILED:
        113 - plugin_http_api_test (Failed)
Errors while running CTest

reran previously failed tests

@bearcubsvet bearcubsvet merged commit daedb7d into Wire-Network:master Dec 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants