diff --git a/tests/pubsub/factories.py b/tests/pubsub/factories.py index 7e713da0..d48ffa1c 100644 --- a/tests/pubsub/factories.py +++ b/tests/pubsub/factories.py @@ -41,7 +41,7 @@ class GossipsubFactory(factory.Factory): degree_high = GOSSIPSUB_PARAMS.degree_high time_to_live = GOSSIPSUB_PARAMS.time_to_live gossip_window = GOSSIPSUB_PARAMS.gossip_window - gossip_history = int(GOSSIPSUB_PARAMS.gossip_history) + gossip_history = GOSSIPSUB_PARAMS.gossip_history heartbeat_interval = GOSSIPSUB_PARAMS.heartbeat_interval diff --git a/tests/pubsub/test_gossipsub.py b/tests/pubsub/test_gossipsub.py index 3c73d192..5dc72afa 100644 --- a/tests/pubsub/test_gossipsub.py +++ b/tests/pubsub/test_gossipsub.py @@ -11,20 +11,7 @@ from .utils import dense_connect, one_to_all_connect @pytest.mark.parametrize( "num_hosts, gossipsub_params", - ( - ( - 4, - GossipsubParams( - degree=4, - degree_low=3, - degree_high=5, - time_to_live=30, - gossip_window=3, - gossip_history=5, - heartbeat_interval=0.5, - ), - ), - ), + ((4, GossipsubParams(degree=4, degree_low=3, degree_high=5)),), ) @pytest.mark.asyncio async def test_join(num_hosts, hosts, gossipsubs, pubsubs_gsub): @@ -149,21 +136,7 @@ async def test_handle_graft(pubsubs_gsub, hosts, gossipsubs, event_loop, monkeyp @pytest.mark.parametrize( - "num_hosts, gossipsub_params", - ( - ( - 2, - GossipsubParams( - degree=10, - degree_low=9, - degree_high=11, - time_to_live=30, - gossip_window=3, - gossip_history=5, - heartbeat_interval=3, - ), - ), - ), + "num_hosts, gossipsub_params", ((2, GossipsubParams(heartbeat_interval=3)),) ) @pytest.mark.asyncio async def test_handle_prune(pubsubs_gsub, hosts, gossipsubs): @@ -375,10 +348,8 @@ async def test_fanout_maintenance(hosts, pubsubs_gsub): degree=1, degree_low=0, degree_high=2, - time_to_live=30, gossip_window=50, gossip_history=100, - heartbeat_interval=0.5, ), ), ),