Fix auto and static sharding subscribe/unsubscribe tests - use a safe un-used cluster-id ever (cluster id 2 is now defaults to logos.dev with its settings), also adapted static sharding unsubscribe to PR#3732

This commit is contained in:
NagyZoltanPeter 2026-03-17 18:53:45 +01:00
parent 33596417e3
commit bb1b08d838
No known key found for this signature in database
GPG Key ID: 3E1F97CF4A7B6F42
3 changed files with 3 additions and 10 deletions

View File

@ -22,7 +22,7 @@ class StepsSharding(StepsRelay):
test_content_topic = "/myapp/1/latest/proto"
test_pubsub_topic = "/waku/2/rs/2/0"
test_payload = "Sharding works!!"
auto_cluster = 2
auto_cluster = 199
num_shards_in_network = 8
@pytest.fixture(scope="function", autouse=True)

View File

@ -96,7 +96,7 @@ CONTENT_TOPICS_SHARD_7 = [
"/newsService/4.0/updates/yaml",
]
DEFAULT_CLUSTER_ID = "3"
DEFAULT_CLUSTER_ID = "198"
VALID_PUBSUB_TOPICS = [
f"/waku/2/rs/{DEFAULT_CLUSTER_ID}/0",
f"/waku/2/rs/{DEFAULT_CLUSTER_ID}/1",

View File

@ -96,14 +96,7 @@ class TestRelayStaticSharding(StepsSharding):
def test_unsubscribe_from_non_subscribed_pubsub_topics(self):
self.setup_main_relay_nodes(cluster_id=self.auto_cluster, pubsub_topic=self.test_pubsub_topic)
try:
self.unsubscribe_main_relay_nodes(pubsub_topics=PUBSUB_TOPICS_SAME_CLUSTER)
if self.node1.is_nwaku():
pass
else:
raise AssertionError("Unsubscribe from non-subscribed pubsub_topic worked!!!")
except Exception as ex:
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
self.unsubscribe_main_relay_nodes(pubsub_topics=PUBSUB_TOPICS_SAME_CLUSTER)
for pubsub_topic in PUBSUB_TOPICS_SAME_CLUSTER:
self.check_publish_fails_on_not_subscribed_pubsub_topic(pubsub_topic)