Skip to content

Commit

Permalink
refactor and suite name refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankshampi committed Sep 27, 2024
1 parent eced002 commit 1c2e221
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1c2e221

Please sign in to comment.