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

Method testEndpointEvents

tests/python/proton_tests/engine.py:2284–2331  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2282 self.cleanup()
2283
2284 def testEndpointEvents(self):
2285 c1, c2 = self.connection()
2286 c1.collect(self.collector)
2287 self.expect(Event.CONNECTION_INIT)
2288 self.pump()
2289 self.expect()
2290 c2.open()
2291 self.pump()
2292 self.expect(Event.CONNECTION_REMOTE_OPEN)
2293 self.pump()
2294 self.expect()
2295
2296 ssn = c2.session()
2297 snd = ssn.sender("sender")
2298 ssn.open()
2299 snd.open()
2300
2301 self.expect()
2302 self.pump()
2303 self.expect(Event.SESSION_INIT, Event.SESSION_REMOTE_OPEN,
2304 Event.LINK_INIT, Event.LINK_REMOTE_OPEN)
2305
2306 c1.open()
2307 ssn2 = c1.session()
2308 ssn2.open()
2309 rcv = ssn2.receiver("receiver")
2310 rcv.open()
2311 self.pump()
2312 self.expect(Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
2313 Event.SESSION_INIT, Event.SESSION_LOCAL_OPEN,
2314 Event.TRANSPORT, Event.LINK_INIT, Event.LINK_LOCAL_OPEN,
2315 Event.TRANSPORT)
2316
2317 rcv.close()
2318 self.expect(Event.LINK_LOCAL_CLOSE, Event.TRANSPORT)
2319 self.pump()
2320 rcv.free()
2321 del rcv
2322 self.expect(Event.LINK_FINAL)
2323 ssn2.free()
2324 del ssn2
2325 self.pump()
2326 c1.free()
2327 c1.transport.unbind()
2328 self.expect_oneof((Event.SESSION_FINAL, Event.LINK_FINAL, Event.SESSION_FINAL,
2329 Event.CONNECTION_UNBOUND, Event.CONNECTION_FINAL),
2330 (Event.CONNECTION_UNBOUND, Event.SESSION_FINAL, Event.LINK_FINAL,
2331 Event.SESSION_FINAL, Event.CONNECTION_FINAL))
2332
2333 def testConnectionINIT_FINAL(self):
2334 c = Connection()

Callers

nothing calls this directly

Calls 12

expectMethod · 0.80
expect_oneofMethod · 0.80
connectionMethod · 0.65
collectMethod · 0.65
openMethod · 0.65
sessionMethod · 0.65
senderMethod · 0.65
receiverMethod · 0.65
closeMethod · 0.65
freeMethod · 0.65
unbindMethod · 0.65
pumpMethod · 0.45

Tested by

no test coverage detected