rate limit changes (#59)
This commit is contained in:
parent
a6e56885da
commit
cfc6aa8f72
|
@ -61,12 +61,12 @@ class TestFilterSubscribeCreate(StepsFilter):
|
|||
failed_content_topics.append(content_topic)
|
||||
assert not failed_content_topics, f"ContentTopics failed: {failed_content_topics}"
|
||||
|
||||
def test_filter_subscribe_to_100_content_topics_in_separate_calls(self, subscribe_main_nodes):
|
||||
_100_content_topics = [str(i) for i in range(100)]
|
||||
for content_topic in _100_content_topics:
|
||||
def test_filter_subscribe_to_29_content_topics_in_separate_calls(self, subscribe_main_nodes):
|
||||
_29_content_topics = [str(i) for i in range(29)]
|
||||
for content_topic in _29_content_topics:
|
||||
self.create_filter_subscription({"requestId": "1", "contentFilters": [content_topic], "pubsubTopic": self.test_pubsub_topic})
|
||||
failed_content_topics = []
|
||||
for content_topic in _100_content_topics:
|
||||
for content_topic in _29_content_topics:
|
||||
logger.debug(f"Running test with content topic {content_topic}")
|
||||
message = self.create_message(contentTopic=content_topic)
|
||||
try:
|
||||
|
@ -75,6 +75,11 @@ class TestFilterSubscribeCreate(StepsFilter):
|
|||
logger.error(f"ContentTopic {content_topic} failed: {str(ex)}")
|
||||
failed_content_topics.append(content_topic)
|
||||
assert not failed_content_topics, f"ContentTopics failed: {failed_content_topics}"
|
||||
try:
|
||||
self.create_filter_subscription({"requestId": "1", "contentFilters": ["rate limited"], "pubsubTopic": self.test_pubsub_topic})
|
||||
raise AssertionError("The 30th subscribe call was not rate limited!!!")
|
||||
except Exception as ex:
|
||||
assert "subscription failed" in str(ex) or "rate limit exceeded" in str(ex)
|
||||
|
||||
def test_filter_subscribe_to_101_content_topics(self, subscribe_main_nodes):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue