Skip to content

Commit

Permalink
Removed test for application_headers when no compression enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
nzlosh committed Mar 19, 2024
1 parent 6aaaaaf commit 2368557
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions st2common/st2common/transport/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
class PoolPublisher(object):
def __init__(self, urls=None):
"""
:param urls: Connection URLs to use. If not provided it uses a default value from th
config.
:param urls: Connection URLs to use. If not provided it uses a default value from
the config.
:type urls: ``list``
"""
urls = urls or transport_utils.get_messaging_urls()
Expand All @@ -67,7 +67,7 @@ def publish(self, payload, exchange, routing_key="", compression=None):
)

def do_publish(connection, channel):
# ProducerPool ends up creating it own ConnectionPool which ends up
# ProducerPool ends up creating its own ConnectionPool which ends up
# completely invalidating this ConnectionPool. Also, a ConnectionPool for
# producer does not really solve any problems for us so better to create a
# Producer for each publish.
Expand Down
3 changes: 0 additions & 3 deletions st2common/tests/unit/test_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ def test_publish_compression(self):
self.assertEqual(
watcher.received_messages[0][1].properties["content_encoding"], "binary"
)
self.assertEqual(
watcher.received_messages[0][1].properties["application_headers"], {}
)
self.assertEqual(watcher.received_messages[0][0].id, live_action_db.id)

# 2. Verify config level option is used
Expand Down

0 comments on commit 2368557

Please sign in to comment.