Skip to content

Commit

Permalink
lower down number of published messages in the test to ensure they ge…
Browse files Browse the repository at this point in the history
…t completely consumed before running out of time.
  • Loading branch information
farirat committed Feb 24, 2022
1 parent f6ae5cf commit fa63b4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/managers/test_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,10 @@ def test_delivery_of_queued_messages(self):
localConfig.submit_sm_throughput = 20
yield self.add(localConfig)

# Send 180 messages to the queue
# Send 150 messages to the queue
submitCounter = 0
submit_sm_pdu = copy.copy(self.SubmitSmPDU)
while submitCounter < 180:
while submitCounter < 150:
submit_sm_pdu.params['short_message'] = '%s' % submitCounter
yield self.submit_sm(localConfig.id, submit_sm_pdu, self.SubmitSmBill)
submitCounter += 1
Expand All @@ -897,11 +897,11 @@ def test_delivery_of_queued_messages(self):
yield self.stop(localConfig.id)

# Wait for unbound state
yield waitFor(15)
yield waitFor(20)

# Assertions
# Take the lastClient (and unique one) and assert received message
self.assertEqual(len(self.SMSCPort.factory.lastClient.submitRecords), 180)
self.assertEqual(len(self.SMSCPort.factory.lastClient.submitRecords), 150)

@defer.inlineCallbacks
def test_submitSm_validity(self):
Expand Down

0 comments on commit fa63b4f

Please sign in to comment.