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

Method testEndpointEvents

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

Source from the content-addressed store, hash-verified

2446 self.cleanup()
2447
2448 def testEndpointEvents(self):
2449 c1, c2 = self.connection()
2450 c1.collect(self.collector)
2451 self.expect(Event.CONNECTION_INIT)
2452 self.pump()
2453 self.expect()
2454 c2.open()
2455 self.pump()
2456 self.expect(Event.CONNECTION_REMOTE_OPEN)
2457 self.pump()
2458 self.expect()
2459
2460 ssn = c2.session()
2461 snd = ssn.sender("sender")
2462 ssn.open()
2463 snd.open()
2464
2465 self.expect()
2466 self.pump()
2467 self.expect(Event.SESSION_INIT, Event.SESSION_REMOTE_OPEN,
2468 Event.LINK_INIT, Event.LINK_REMOTE_OPEN)
2469
2470 c1.open()
2471 ssn2 = c1.session()
2472 ssn2.open()
2473 rcv = ssn2.receiver("receiver")
2474 rcv.open()
2475 self.pump()
2476 self.expect(Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT,
2477 Event.SESSION_INIT, Event.SESSION_LOCAL_OPEN,
2478 Event.TRANSPORT, Event.LINK_INIT, Event.LINK_LOCAL_OPEN,
2479 Event.TRANSPORT)
2480
2481 rcv.close()
2482 self.expect(Event.LINK_LOCAL_CLOSE, Event.TRANSPORT)
2483 self.pump()
2484 rcv.free()
2485 del rcv
2486 self.expect(Event.LINK_FINAL)
2487 ssn2.free()
2488 del ssn2
2489 self.pump()
2490 c1.free()
2491 c1.transport.unbind()
2492 self.expect_oneof((Event.SESSION_FINAL, Event.LINK_FINAL, Event.SESSION_FINAL,
2493 Event.CONNECTION_UNBOUND, Event.CONNECTION_FINAL),
2494 (Event.CONNECTION_UNBOUND, Event.SESSION_FINAL, Event.LINK_FINAL,
2495 Event.SESSION_FINAL, Event.CONNECTION_FINAL))
2496
2497 def testConnectionINIT_FINAL(self):
2498 c = Connection()

Callers

nothing calls this directly

Calls 12

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

Tested by

no test coverage detected