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

Method testOddFrame

python/tests/proton_tests/engine.py:1117–1162  ·  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

1115 assert binary is None
1116
1117 def testOddFrame(self):
1118 """
1119 Test an odd sized max limit with data that will require multiple frames to
1120 be transfered.
1121 """
1122 self.snd, self.rcv = self.link("test-link", max_frame=[0, 521])
1123 self.c1 = self.snd.session.connection
1124 self.c2 = self.rcv.session.connection
1125 self.snd.open()
1126 self.rcv.open()
1127 self.pump()
1128 assert self.rcv.session.connection.transport.max_frame_size == 521
1129 assert self.snd.session.connection.transport.remote_max_frame_size == 521
1130
1131 self.rcv.flow(2)
1132 self.snd.delivery("tag")
1133 msg = ("X" * 1699).encode('utf-8')
1134 n = self.snd.send(msg)
1135 assert n == len(msg)
1136 assert self.snd.advance()
1137
1138 self.pump()
1139
1140 binary = self.rcv.recv(1699)
1141 assert binary == msg
1142
1143 binary = self.rcv.recv(1024)
1144 assert binary is None
1145
1146 self.rcv.advance()
1147
1148 self.snd.delivery("gat")
1149 msg = self.message(1426)
1150 n = self.snd.send(msg)
1151 assert n == len(msg)
1152 assert self.snd.advance()
1153
1154 self.pump()
1155
1156 binary = self.rcv.recv(1426)
1157 assert binary == msg
1158
1159 self.pump()
1160
1161 binary = self.rcv.recv(1024)
1162 assert binary is None
1163
1164 def testSendQueuedMultiFrameMessages(self, sendSingleFrameMsg=False):
1165 """

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected