Exemple #1
0
 def testInsertMessage(self):
     t = FakeStub()
     s = connector.OutgoingConnection(None, 'test', t)
     s.InsertMessage(common_pb2.Message())
     self.assertTrue(t.insert_done)
     self.assertFalse(t.insert_errors)
     self.assertEqual(t.message.source.service_name, 'test')
Exemple #2
0
 def testDeletePendingMessages(self):
     t = FakeStub()
     s = connector.OutgoingConnection(None, 'test', t)
     s.DeletePendingMessages(admin_pb2.DeletePendingMessagesRequest())
     self.assertTrue(t.delete_done)
     self.assertFalse(t.delete_errors)
Exemple #3
0
 def testKeepAlive(self):
     t = FakeStub()
     s = connector.OutgoingConnection(None, 'test', t)
     self.assertTrue(t.event.wait(10))
     s.Shutdown()
 def testGetPendingMessageCount(self):
     t = FakeStub()
     s = connector.OutgoingConnection(None, 'test', t)
     s.GetPendingMessageCount(admin_pb2.GetPendingMessageCountRequest())
     self.assertTrue(t.get_count_done)
     self.assertFalse(t.get_count_errors)