コード例 #1
0
ファイル: Test_MQConsumer.py プロジェクト: andresailer/DIRAC
 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!)')
コード例 #2
0
 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!)')
コード例 #3
0
ファイル: Test_MQConsumer.py プロジェクト: TaykYoku/DIRAC
 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!)",
     )
コード例 #4
0
ファイル: Test_MQConsumer.py プロジェクト: vingar/DIRAC
 def test_success(self):
     consumer = MQConsumer(mqManager=self.myManager,
                           mqURI="fake.cern.ch::Queue::FakeQueue",
                           consumerId='consumer4')
     result = consumer.close()
     self.assertTrue(result['OK'])
コード例 #5
0
ファイル: Test_MQConsumer.py プロジェクト: andresailer/DIRAC
 def test_success( self ):
   consumer = MQConsumer(mqManager = self.myManager, mqURI  = "fake.cern.ch::Queue::FakeQueue", consumerId ='consumer4')
   result = consumer.close()
   self.assertTrue(result['OK'])