Skip to content

Commit

Permalink
Fix test for msg sending
Browse files Browse the repository at this point in the history
Signed-off-by: dsurnin <[email protected]>
  • Loading branch information
dsurnin committed Mar 28, 2018
1 parent b89ee0a commit dfeebba
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions stp_zmq/test/test_quotas.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
from stp_zmq.zstack import ZStack


BIG_NUM_OF_MSGS = 100000


@pytest.fixture()
def tconf(tconf):
old_num = tconf.ZMQ_INTERNAL_QUEUE_SIZE
tconf.ZMQ_INTERNAL_QUEUE_SIZE = BIG_NUM_OF_MSGS
yield tconf
tconf.ZMQ_INTERNAL_QUEUE_SIZE = old_num


def testMessageQuota(set_info_log_level, tdir, looper):
names = ['Alpha', 'Beta']
genKeys(tdir, names)
Expand Down Expand Up @@ -38,7 +49,7 @@ def checkAllReceived():
timeout=5))


def testManyMessages(set_info_log_level, tdir, looper):
def testManyMessages(set_info_log_level, tdir, looper, tconf):
names = ['Alpha', 'Beta']
genKeys(tdir, names)
alphaP = Printer(names[0])
Expand All @@ -58,7 +69,7 @@ def testManyMessages(set_info_log_level, tdir, looper):

looper.runFor(1)

msgNum = 100000
msgNum = BIG_NUM_OF_MSGS
msgSender = MessageSender(msgNum, alpha, beta.name)
looper.add(msgSender)

Expand Down

0 comments on commit dfeebba

Please sign in to comment.