예제 #1
0
 def test_default_user(self):
     ''' Default user connection '''
     self.conn.disconnect()
     test_util.enable_default_user()
     listener = base.WaitableListener()
     new_conn = stomp.Connection()
     new_conn.set_listener('', listener)
     new_conn.start()
     new_conn.connect()
     try:
         self.assertFalse(listener.await(3)) # no error back
         self.assertTrue(new_conn.is_connected())
     finally:
         new_conn.disconnect()
         test_util.disable_default_user()
예제 #2
0
 def test_default_user(self):
     ''' Default user connection '''
     self.conn.disconnect()
     test_util.enable_default_user()
     listener = base.WaitableListener()
     new_conn = stomp.Connection(host_and_ports=[('localhost', int(os.environ["STOMP_PORT"]))])
     new_conn.set_listener('', listener)
     new_conn.start()
     new_conn.connect()
     try:
         self.assertFalse(listener.await(3)) # no error back
         self.assertTrue(new_conn.is_connected())
     finally:
         new_conn.disconnect()
         test_util.disable_default_user()
예제 #3
0
 def test_default_user(self):
     ''' Default user connection '''
     self.conn.disconnect()
     test_util.enable_default_user()
     listener = base.WaitableListener()
     new_conn = stomp.Connection(
         host_and_ports=[('localhost', int(os.environ["STOMP_PORT"]))])
     new_conn.set_listener('', listener)
     new_conn.connect()
     try:
         self.assertFalse(listener.wait(3))  # no error back
         self.assertTrue(new_conn.is_connected())
     finally:
         new_conn.disconnect()
         test_util.disable_default_user()
예제 #4
0
 def test_default_user(self):
     ''' Default user connection '''
     self.conn.disconnect()
     test_util.enable_default_user()
     listener = base.WaitableListener()
     new_conn = stomp.Connection()
     new_conn.set_listener('', listener)
     new_conn.start()
     new_conn.connect()
     try:
         self.assertFalse(listener. await (3))  # no error back
         self.assertTrue(new_conn.is_connected())
     finally:
         new_conn.disconnect()
         test_util.disable_default_user()