Skip to content

Commit

Permalink
Merge pull request #39 from isi-mfurer/mf-integ
Browse files Browse the repository at this point in the history
Integrate pike 0.2.12
  • Loading branch information
isi-mfurer authored Jul 13, 2017
2 parents f626f0f + f6d8944 commit 1216490
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pike/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
'test',
'transport',
]
__version_info__ = (0, 2, 11)
__version_info__ = (0, 2, 12)
__version__ = "{0}.{1}.{2}".format(*__version_info__)
13 changes: 11 additions & 2 deletions pike/test/credit.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,18 @@ def test_sequence_number_wrap(self):
# build up the sequence number to the target
while chan1.connection._next_mid < sequence_number_target:
smb_req = chan1.write_request(fh1, 0, buf*credits_per_req).parent
smb_resp = chan1.connection.submit(smb_req.parent)[0].result()
smb_future = chan1.connection.submit(smb_req.parent)[0]
smb_resp = smb_future.result()
if smb_future.interim_response:
# if server granted credits on interim
self.assertEqual(smb_future.interim_response.credit_response,
credits_per_req)
# then server should grant 0 credits on final resp
self.assertEqual(smb_resp.credit_response, 0)
else:
# otherwise, all credits should be granted in final response
self.assertEqual(smb_resp.credit_response, credits_per_req)
# if the server is granting our request,
self.assertEqual(smb_resp.credit_response, credits_per_req)
# then total number of credits should stay the same
self.assertEqual(chan1.connection.credits, exp_credits)

Expand Down

0 comments on commit 1216490

Please sign in to comment.