From 1c2e221d75da95dda88702ed642217191feb2fb1 Mon Sep 17 00:00:00 2001 From: shashankshampi Date: Fri, 27 Sep 2024 10:16:49 +0530 Subject: [PATCH] refactor and suite name refactor --- ...ossipinternal2.nim => testgossipmembership.nim} | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) rename tests/pubsub/{testgossipinternal2.nim => testgossipmembership.nim} (97%) diff --git a/tests/pubsub/testgossipinternal2.nim b/tests/pubsub/testgossipmembership.nim similarity index 97% rename from tests/pubsub/testgossipinternal2.nim rename to tests/pubsub/testgossipmembership.nim index 6c961fddc..82157f9db 100644 --- a/tests/pubsub/testgossipinternal2.nim +++ b/tests/pubsub/testgossipmembership.nim @@ -30,7 +30,7 @@ proc noop(data: seq[byte]) {.async: (raises: [CancelledError, LPStreamError]).} const MsgIdSuccess = "msg id gen success" -suite "GossipSub internal2": +suite "GossipSub Topic Membership Tests": teardown: checkTrackers() @@ -61,7 +61,8 @@ suite "GossipSub internal2": gossipSub.PubSub.subscribe( topic, proc(topic: string, data: seq[byte]): Future[void] {.async.} = - discard, + discard + , ) check gossipSub.topics.contains(topic) # Check if the topic is in topics @@ -96,7 +97,8 @@ suite "GossipSub internal2": gossipSub.PubSub.subscribe( topic, proc(topic: string, data: seq[byte]): Future[void] {.async.} = - discard, + discard + , ) # Now unsubscribe from the topic @@ -128,7 +130,8 @@ suite "GossipSub internal2": gossipSub.PubSub.subscribe( topic, proc(topic: string, data: seq[byte]): Future[void] {.async.} = - discard, + discard + , ) # Verify that all topics are added to the topics and gossipsub @@ -166,7 +169,8 @@ suite "GossipSub internal2": gossipSub.PubSub.subscribe( topic, proc(topic: string, data: seq[byte]): Future[void] {.async.} = - discard, + discard + , ) else: # Prevent subscription beyond the limit and log the error