Skip to content

Commit

Permalink
GH-1510 Add p2p_sync_throttle_if_test
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jan 30, 2024
1 parent f7c786b commit cff69d7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ add_test(NAME p2p_no_listen_test COMMAND tests/p2p_no_listen_test.py -v ${UNSHAR
set_property(TEST p2p_no_listen_test PROPERTY LABELS nonparallelizable_tests)
add_test(NAME p2p_sync_throttle_test COMMAND tests/p2p_sync_throttle_test.py -v -d 2 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST p2p_sync_throttle_test PROPERTY LABELS nonparallelizable_tests)
add_test(NAME p2p_sync_throttle_if_test COMMAND tests/p2p_sync_throttle_test.py -v -d 2 --activate-if ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST p2p_sync_throttle_if_test PROPERTY LABELS nonparallelizable_tests)

# needs iproute-tc or iproute2 depending on platform
#add_test(NAME p2p_high_latency_test COMMAND tests/p2p_high_latency_test.py -v WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
Expand Down
5 changes: 3 additions & 2 deletions tests/p2p_sync_throttle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
appArgs.add(flag='--plugin',action='append',type=str,help='Run nodes with additional plugins')
appArgs.add(flag='--connection-cleanup-period',type=int,help='Interval in whole seconds to run the connection reaper and metric collection')

args=TestHelper.parse_args({"-d","--keep-logs"
args=TestHelper.parse_args({"-d","--keep-logs","--activate-if"
,"--dump-error-details","-v","--leave-running"
,"--unshared"},
applicationSpecificArgs=appArgs)
Expand All @@ -33,6 +33,7 @@
debug=args.v
prod_count = 2
total_nodes=4
activateIF=args.activate_if
dumpErrorDetails=args.dump_error_details

Utils.Debug=debug
Expand Down Expand Up @@ -60,7 +61,7 @@ def extractPrometheusMetric(connID: str, metric: str, text: str):
# Custom topology is a line of singlely connected nodes from highest node number in sequence to lowest,
# the reverse of the usual TestHarness line topology.
if cluster.launch(pnodes=pnodes, unstartedNodes=2, totalNodes=total_nodes, prodCount=prod_count,
topo='./tests/p2p_sync_throttle_test_shape.json', delay=delay,
topo='./tests/p2p_sync_throttle_test_shape.json', delay=delay, activateIF=activateIF,
extraNodeosArgs=extraNodeosArgs) is False:
errorExit("Failed to stand up eos cluster.")

Expand Down
25 changes: 20 additions & 5 deletions tests/p2p_sync_throttle_test_shape.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"keys": [
{
"pubkey": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"privkey": "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
"privkey": "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3",
"blspubkey":"PUB_BLS_2QQ72DAhKOWKfnBF77AnYn3GqD0M+Yh/05tqKNhqEQ0K4ixhIZ0rKbO2UuonqGAV1KYPgLzIfRz6zMD4iWI3FhOGE+UZ4Le5cELQ3NjOBFagG51XqM8Q1lpUqNanhCoDyfFnLg==",
"blsprivkey":"PVT_BLS_XwmVWf21N/j+hYJfo5+VHN1BtMY2wmKdQ7unaX/rzk+EJ5PX",
"blspop":"SIG_BLS_jvAPOOkvw19wuEzIt1ot8tn6aLeP55XQtSIY2eP3DMcZvEcdmlWVqNI/M8VNKL8RiN2F7XrRZ6O5cPPh4f3B/XfHOyUd3UXG3p++9m0tu0jCojtWQd6wJmTIR1LQ6DUWAQwBOx8Rd70FoznDEqJS/RZBV03x9FpBDQH7VB6BYs9UztynlWrL8LZaRbi8WNwF9CDzUJJsmOmHMnZO5qcTuo/cmSgV1X03bITdQ4IGq06yExBPepIX9ZZu5XH4QCIBo/fIcg=="
}
],
"peers": [
Expand All @@ -30,7 +33,10 @@
"keys": [
{
"pubkey": "EOS7D6jfN6bbJD9cYheyhnBT4bmUWc3Qf4Yphf5GBeAAy58okcwHU",
"privkey": "5KkmnyunnpCQzgFoLMEtU3j7BRBa5aWmsBNru49ke7LdnZKFhmt"
"privkey": "5KkmnyunnpCQzgFoLMEtU3j7BRBa5aWmsBNru49ke7LdnZKFhmt",
"blspubkey":"PUB_BLS_g86vgFO5G0bcRuaEA95kNFxnsHyzVSOthKKN8MSJ2zLWj+WfCbIBIO73OxgzjVsZarSuMQrcbVu2MktqF6PGlPkPaSuJGnES3FQ0OAfebOMAsPeAd23Ge/3+cPl2OVgXSmHdhA==",
"blsprivkey":"PVT_BLS_AtgyGDKJdQWvCNyGJgyu9bWpMS7eQE07zB2nGTlhZ0nCX11C",
"blspop":"SIG_BLS_pzPEYt1zLPVbofA1YABSPb1gJdvUdUhREa+pQsj2eTSaEBEnb+w+AwO0cQLgYSYWNWRePIUUvj5MCWqlfIU5ulBL8tqlwdCqQ0o6W915axLq2l1qnbFK/XfN9dRxdJgWPdl57bCGmoii25gdyobgLUZaJzPfivE6iQ981IgGACAb5CRdVH5hPZq8Rab1O64OclwCT/8ho8TdcKoSQj0njbAfp9JZxv5EyuAkaNIQun9rn+vH++37n+nDeV6UgCUEzex3cQ=="
}
],
"peers": [],
Expand Down Expand Up @@ -71,7 +77,10 @@
"keys": [
{
"pubkey": "EOS5tZqxLB8y9q2yHkgcXU4QFBEV6QKN3NQ54ygaFLWHJbjqYzFhw",
"privkey": "5KBs4qR7T8shJjCJUeFQXd77iKrok5TCtZiQhWJpCpc1VRxpNAs"
"privkey": "5KBs4qR7T8shJjCJUeFQXd77iKrok5TCtZiQhWJpCpc1VRxpNAs",
"blspubkey":"PUB_BLS_PerMKMuQdZ3N6NEOoQRdlB1BztNWAeHkmzqwcFwEQGEM8QMfv3mrrepX5yM4NKQHYDnfcPIQPpDt0gCi6afvpZgN0JHT4jUaNlbfsJKtbm5mOJcqggddamCKEz2lBC0OS2D5yw==",
"blsprivkey":"PVT_BLS_n4AshIQiCqCdIOC/lGkKauVOFE2KelMb3flVvodVsji15FHW",
"blspop":"SIG_BLS_oqOzQYpJRvQ88ExpJKmwgna29eXM5umPpLmjfHcdcUUKwS3NMWwvP1hLwLcj4XcU6CuM3RzfRo6PPE2sxrp2fUWpqP0bsuamcOOyF+V6TfJMYuDbepc1Jp9HUdli3X0QE6hL+umbO2PWE4KiCSn9tj9LRyXgc41IY7R/JeQCCQSNXMSWhebdB/KCapfxq8sYEzRhXcZik+bXUDC1AcLXaocvNV6o2nKHtJwQ7YyGXCvFXgMMcQ3PWFlQ8WErmxILOM3Z/w=="
}
],
"peers": [
Expand All @@ -92,7 +101,10 @@
"keys": [
{
"pubkey": "EOS5FBPf5EN9bYEqmsKfPx9bxyUZ9grDiE24zqLFXtPa6UpVzMjE7",
"privkey": "5HtVDiAsD24seDm5sdswTcdZpx672XbBW9gBkyrzbsj2j9Y9JeC"
"privkey": "5HtVDiAsD24seDm5sdswTcdZpx672XbBW9gBkyrzbsj2j9Y9JeC",
"blspubkey":"PUB_BLS_6C3UlotUoDwruilh6gE+qlKsqY7VrmT6eT3aTr9fC0kZUkQRo13/xMh7MZerbBED2Rho72BLHIaWnT01LLsCFIZg9pSyHBFt3EcKa4p6OyvTkQAFxNb739EYcTVx2n8Gi0d+iw==",
"blsprivkey":"PVT_BLS_Tw2Lozr/Qw2/uf13xo6vduAWqzJnWu2o0/s9WalErmkq4RPV",
"blspop":"SIG_BLS_mrKA0CFFTP3udLsaWH67ilVf/5dcCHfzJ+P8i+dEuVg4y+td8uyghJqDxnPoitMEjjSqP12kmSZciDXqWD+uGU7nY1YeDK5Tvi7cvd1qSOuATjDuW+amc/5SKp73NLsYwqVFcIex4XF+Quu/NRfDCfLj9ZRPtmuNAUevi2iz0ExeOkQTjQhKksb9ihN+6w4Wk0vJEjt0KbbW2Ny46J+P7PbanH34X9iCV3dT+lqnyp9om0hxKJJIH2R6P5hC2d8Ry8FBAw=="
}
],
"peers": [
Expand All @@ -113,7 +125,10 @@
"keys": [
{
"pubkey": "EOS8XH2gKxsef9zxmMHm4vaSvxQUhg7W4GC3nK2KSRxyYrNG5gZFS",
"privkey": "5JcoRRhDcgm51dkBrRTmErceTqrYhrq22UnmUjTZToMpH91B9N1"
"privkey": "5JcoRRhDcgm51dkBrRTmErceTqrYhrq22UnmUjTZToMpH91B9N1",
"blspubkey":"PUB_BLS_R5fu+sEP4d2me/9fsyw3lsZeflW1/IuJ9IC5jvRYFDYyzj+gt4zswFgwyp946yEO7T7AC6/NYas5HkJhSWZh2VmulmAbquNLpuXOCVHQgnV7UqV0kmsUk+ADDvx2BqkRZWJGCQ==",
"blsprivkey":"PVT_BLS_C9srbwyvmESO1TY7XMKiQnQPhkrPOS3BkJQ1rOnThEytroKB",
"blspop":"SIG_BLS_mmjqef0rliHQx16BjTcxGTmJx1huB7e2yW+wXQU54f2S5/eUpwvjqZ8nH1YFbg8ZhrAQjBUmjNDSuU80R+zP55XheXSVTpP9nozkgu4uMOZAaBPRHA/Ip2iXwl58N+YIZ3mjaiDjJUhPgty3pjSsHPsF8+K4CrmOB3X9roKbYwvf6vlPvr6253yefF97HyIOiO1pKfqVfPD0WhgdEj8/x2tLz9Mqq8+PXIpuH5AK0F4S9EKc0A9+E+IF3swf3SAJZTVFAA=="
}
],
"peers": [
Expand Down

0 comments on commit cff69d7

Please sign in to comment.