def test_failure( self ): consumer = MQConsumer(mqManager = self.myManager, mqURI = "fake.cern.ch::Queue::FakeQueue", consumerId ='consumer4') result = consumer.close() self.assertTrue(result['OK']) result = consumer.close() self.assertFalse(result['OK']) self.assertEqual(result['Message'], 'MQ connection failure ( 1142 : Failed to stop the connection!The messenger consumer4 does not exist!)')
def test_failure(self): consumer = MQConsumer(mqManager=self.myManager, mqURI="fake.cern.ch::Queues::FakeQueue", consumerId='consumer4') result = consumer.close() self.assertTrue(result['OK']) result = consumer.close() self.assertFalse(result['OK']) self.assertEqual( result['Message'], 'MQ connection failure ( 1142 : Failed to stop the connection!The messenger consumer4 does not exist!)')
def test_failure2(self): consumer = MQConsumer(mqManager=self.myManager, mqURI="fake.cern.ch::Queues::FakeQueue", consumerId="consumer4") consumer2 = MQConsumer(mqManager=self.myManager, mqURI="fake.cern.ch::Queues::FakeQueue", consumerId="consumer2") result = consumer.close() self.assertTrue(result["OK"]) result = consumer.close() self.assertFalse(result["OK"]) self.assertEqual( result["Message"], "MQ connection failure ( 1142 : Failed to stop the connection!The messenger consumer4 does not exist!)", ) result = consumer2.close() self.assertTrue(result["OK"]) result = consumer2.close() self.assertFalse(result["OK"]) self.assertEqual( result["Message"], "MQ connection failure ( 1142 : Failed to stop the connection!The messenger consumer2 does not exist!)", )
def test_success(self): consumer = MQConsumer(mqManager=self.myManager, mqURI="fake.cern.ch::Queue::FakeQueue", consumerId='consumer4') result = consumer.close() self.assertTrue(result['OK'])
def test_success( self ): consumer = MQConsumer(mqManager = self.myManager, mqURI = "fake.cern.ch::Queue::FakeQueue", consumerId ='consumer4') result = consumer.close() self.assertTrue(result['OK'])