Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions python/tests/async_tests/test_pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ async def test_pubsub_exact_happy_path_many_channels(

# Create a map of channels to random messages with shard prefix
channels_and_messages = {
f"{shard_prefix}{get_random_string(10)}": get_random_string(5)
for _ in range(NUM_CHANNELS)
f"{shard_prefix}{get_random_string(10)}:{i}": get_random_string(5)
for i in range(NUM_CHANNELS)
}

callback, context = None, None
Expand Down Expand Up @@ -602,8 +602,8 @@ async def test_sharded_pubsub_many_channels(

# Create a map of channels to random messages with shard prefix
channels_and_messages = {
f"{shard_prefix}{get_random_string(10)}": get_random_string(5)
for _ in range(NUM_CHANNELS)
f"{shard_prefix}{get_random_string(10)}:{i}": get_random_string(5)
for i in range(NUM_CHANNELS)
}

callback, context = None, None
Expand Down Expand Up @@ -683,12 +683,12 @@ async def test_pubsub_pattern(
try:
PATTERN = "{{{}}}:{}".format("channel", "*")
channels = {
"{{{}}}:{}".format("channel", get_random_string(5)): get_random_string(
5
),
"{{{}}}:{}".format("channel", get_random_string(5)): get_random_string(
5
),
"{{{}}}:{}:0".format(
"channel", get_random_string(5)
): get_random_string(5),
"{{{}}}:{}:1".format(
"channel", get_random_string(5)
): get_random_string(5),
}

callback, context = None, None
Expand Down Expand Up @@ -817,10 +817,10 @@ async def test_pubsub_pattern_many_channels(
NUM_CHANNELS = 256
PATTERN = "{{{}}}:{}".format("channel", "*")
channels = {
"{{{}}}:{}".format("channel", get_random_string(5)): get_random_string(
5
)
for _ in range(NUM_CHANNELS)
"{{{}}}:{}:{}".format(
"channel", get_random_string(5), i
): get_random_string(5)
for i in range(NUM_CHANNELS)
}

callback, context = None, None
Expand Down
Loading