MCPcopy Create free account
hub / github.com/apache/qpid-proton-j / testOddFrame

Method testOddFrame

tests/python/proton_tests/engine.py:1039–1084  ·  view source on GitHub ↗

Test an odd sized max limit with data that will require multiple frames to be transfered.

(self)

Source from the content-addressed store, hash-verified

1037 assert binary == None
1038
1039 def testOddFrame(self):
1040 """
1041 Test an odd sized max limit with data that will require multiple frames to
1042 be transfered.
1043 """
1044 self.snd, self.rcv = self.link("test-link", max_frame=[0,521])
1045 self.c1 = self.snd.session.connection
1046 self.c2 = self.rcv.session.connection
1047 self.snd.open()
1048 self.rcv.open()
1049 self.pump()
1050 assert self.rcv.session.connection.transport.max_frame_size == 521
1051 assert self.snd.session.connection.transport.remote_max_frame_size == 521
1052
1053 self.rcv.flow(2)
1054 self.snd.delivery("tag")
1055 msg = ("X" * 1699).encode('utf-8')
1056 n = self.snd.send(msg)
1057 assert n == len(msg)
1058 assert self.snd.advance()
1059
1060 self.pump()
1061
1062 binary = self.rcv.recv(1699)
1063 assert binary == msg
1064
1065 binary = self.rcv.recv(1024)
1066 assert binary == None
1067
1068 self.rcv.advance()
1069
1070 self.snd.delivery("gat")
1071 msg = self.message(1426)
1072 n = self.snd.send(msg)
1073 assert n == len(msg)
1074 assert self.snd.advance()
1075
1076 self.pump()
1077
1078 binary = self.rcv.recv(1426)
1079 assert binary == msg
1080
1081 self.pump()
1082
1083 binary = self.rcv.recv(1024)
1084 assert binary == None
1085
1086 def testSendQueuedMultiFrameMessages(self, sendSingleFrameMsg = False):
1087 """

Callers

nothing calls this directly

Calls 10

messageMethod · 0.95
openMethod · 0.65
flowMethod · 0.65
deliveryMethod · 0.65
encodeMethod · 0.65
sendMethod · 0.65
advanceMethod · 0.65
recvMethod · 0.65
linkMethod · 0.45
pumpMethod · 0.45

Tested by

no test coverage detected