fix flaky tests by not using cluster 2

This commit is contained in:
Aya Hassan 2026-07-25 00:41:58 +02:00
parent c71e9a6584
commit 699059037e
4 changed files with 10 additions and 7 deletions

View File

@ -18,7 +18,7 @@ logger = get_custom_logger(__name__)
class StepsFilter(StepsCommon):
test_pubsub_topic = VALID_PUBSUB_TOPICS[1]
second_pubsub_topic = VALID_PUBSUB_TOPICS[2]
another_cluster_pubsub_topic = "/waku/2/rs/2/2"
another_cluster_pubsub_topic = "/waku/2/rs/199/2"
test_content_topic = "/test/1/waku-filter/proto"
second_content_topic = "/test/2/waku-filter/proto"
test_payload = "Filter works!!"

View File

@ -124,8 +124,10 @@ PUBSUB_TOPICS_STORE = [
INVALID_PUBSUB_TOPICS = ["/test/2/rs/0/1", "/waku/3/rs/0/1", "/waku/2/test/0/1", "/waku/2/rs/3/b", "/waku/2/rs/0"]
PUBSUB_TOPICS_DIFFERENT_CLUSTERS = [
"/waku/2/rs/2/0",
"/waku/2/rs/2/1",
# cluster 2 is the logos.dev default cluster with its own settings, so it is
# reserved; use the safe cluster 199 instead.
"/waku/2/rs/199/0",
"/waku/2/rs/199/1",
"/waku/2/rs/5/0",
"/waku/2/rs/5/1",
"/waku/2/rs/5/999",

View File

@ -22,8 +22,8 @@ class TestRelayStaticSharding(StepsSharding):
def test_subscribe_and_publish_on_another_shard(self):
self.setup_main_relay_nodes(pubsub_topic=self.test_pubsub_topic)
self.subscribe_main_relay_nodes(pubsub_topics=["/waku/2/rs/2/1"])
self.check_published_message_reaches_relay_peer(pubsub_topic="/waku/2/rs/2/1")
self.subscribe_main_relay_nodes(pubsub_topics=["/waku/2/rs/199/1"])
self.check_published_message_reaches_relay_peer(pubsub_topic="/waku/2/rs/199/1")
try:
self.check_published_message_reaches_relay_peer(pubsub_topic=self.test_pubsub_topic)
if self.node2.is_nwaku():
@ -36,7 +36,7 @@ class TestRelayStaticSharding(StepsSharding):
def test_cant_publish_on_not_subscribed_shard(self):
self.setup_main_relay_nodes(pubsub_topic=self.test_pubsub_topic)
self.subscribe_main_relay_nodes(pubsub_topics=[self.test_pubsub_topic])
self.check_publish_fails_on_not_subscribed_pubsub_topic("/waku/2/rs/2/1")
self.check_publish_fails_on_not_subscribed_pubsub_topic("/waku/2/rs/199/1")
def test_subscribe_via_api_to_new_pubsub_topics(self):
self.setup_main_relay_nodes(pubsub_topic=PUBSUB_TOPICS_SAME_CLUSTER[:1])

View File

@ -57,7 +57,8 @@ class TestRunningNodesStaticSharding(StepsSharding):
assert f"Peer NODE_2:{NODE_2} couldn't find any messages" in str(ex)
def test_start_node_with_50_pubsub_topics(self):
topics = ["/waku/2/rs/2/" + str(i) for i in range(50)]
# cluster 2 is the reserved logos.dev default cluster; use the safe cluster 199
topics = ["/waku/2/rs/199/" + str(i) for i in range(50)]
self.setup_main_relay_nodes(pubsub_topic=topics)
self.subscribe_main_relay_nodes(pubsub_topics=topics)
for pubsub_topic in topics: