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:
149
149
validators = [EthValidator (index = validator ["index" ]) for validator in committee ["validators" ]],
150
150
)
151
151
152
- if isinstance (data , str ):
152
+ if isinstance (data , ( str , bytes ) ):
153
153
data_dict = json .loads (data )
154
154
else :
155
155
data_dict = data
156
+ logger .debug (f"data_dict type { type (data_dict )} " )
157
+ logger .debug ("Data: %s" , data_dict )
156
158
157
159
slot = data_dict ["block_number" ]
158
160
epoch = slot // 32
Original file line number Diff line number Diff line change 1
1
import logging
2
2
import typing as t
3
3
4
- from locust import task
4
+ from locust import task , tag
5
5
6
6
from chainbench .test_data .ethereum import EthBeaconTestData
7
7
from chainbench .user .http import HttpUser
8
8
from chainbench .user .wss import WSSubscription
9
+ from chainbench .util .rng import RNGManager
9
10
10
11
logger = logging .getLogger (__name__ )
11
12
12
13
13
14
class EthBeaconBaseUser (HttpUser ):
14
15
abstract = True
15
16
test_data = EthBeaconTestData ()
17
+ rng = RNGManager ()
16
18
17
19
def eth_beacon_blocks_request (
18
20
self ,
@@ -327,9 +329,11 @@ def eth_v1_node_version_task(self):
327
329
328
330
329
331
class TestEthMethod (EthBeaconUser ):
332
+ @tag ("single" )
330
333
@task
331
334
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 )
333
337
334
338
335
339
class EthSubscribe (WSSubscription ):
You can’t perform that action at this time.
0 commit comments