File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -149,10 +149,12 @@ def get_committee(committee: dict[str, t.Any]) -> EthCommittee:
149149 validators = [EthValidator (index = validator ["index" ]) for validator in committee ["validators" ]],
150150 )
151151
152- if isinstance (data , str ):
152+ if isinstance (data , ( str , bytes ) ):
153153 data_dict = json .loads (data )
154154 else :
155155 data_dict = data
156+ logger .debug (f"data_dict type { type (data_dict )} " )
157+ logger .debug ("Data: %s" , data_dict )
156158
157159 slot = data_dict ["block_number" ]
158160 epoch = slot // 32
Original file line number Diff line number Diff line change 11import logging
22import typing as t
33
4- from locust import task
4+ from locust import tag , task
55
66from chainbench .test_data .ethereum import EthBeaconTestData
77from chainbench .user .http import HttpUser
88from chainbench .user .wss import WSSubscription
9+ from chainbench .util .rng import RNGManager
910
1011logger = logging .getLogger (__name__ )
1112
1213
1314class EthBeaconBaseUser (HttpUser ):
1415 abstract = True
1516 test_data = EthBeaconTestData ()
17+ rng = RNGManager ()
1618
1719 def eth_beacon_blocks_request (
1820 self ,
@@ -327,9 +329,11 @@ def eth_v1_node_version_task(self):
327329
328330
329331class TestEthMethod (EthBeaconUser ):
332+ @tag ("single" )
330333 @task
331334 def run_task (self ) -> None :
332- self .method_to_task_function (self .environment .parsed_options .method )()
335+ self .logger .info (f"Running task { self .environment .parsed_options .method } " )
336+ self .method_to_task_function (self .environment .parsed_options .method )(self )
333337
334338
335339class EthSubscribe (WSSubscription ):
You can’t perform that action at this time.
0 commit comments