def test_multiple_transport(self): """Create multiple servers on the same host""" # Get the hostname import platform host = platform.node() self.assertNotEqual(0, len(host)) fbt1 = FlowBuilderTransport(host, host) fbt2 = FlowBuilderTransport(host, host) fbt2.shutdown() fbt1.shutdown()
def test_multiple_transport_detailed(self): """Create multiple servers on the same host""" # Get the hostname import platform host = platform.node() self.assertNotEqual(0, len(host)) fbt1 = FlowBuilderTransport(host, host) fbt2 = FlowBuilderTransport(host, host) # Now test that a message can cross the transports host1 = fbt1.getFlowBuilder().hostname() host2 = fbt2.getFlowBuilder().hostname() self.assertEqual(host1, host2) # Shutdown cleanly fbt2.shutdown() fbt1.shutdown()