Exemplo n.º 1
0
 def testLossOneToOneToMaster(self):
     '''
     One slave sends messages to one master with packet loss
     '''
     console.terse("{0}\n".format(self.testLossOneToOneToMaster.__doc__))
     self.assertTrue(netem.loss(percent=30, correlation=25))
     self.assertEqual(netem.check(), 1)
     self.messagingMultiPeers(masterCount=1,
                              minionCount=1,
                              msgSize=testing.MSG_SIZE_MED,
                              msgCount=testing.MSG_COUNT_MED,
                              duration=100.0,
                              direction=testing.DIR_TO_MASTER)
Exemplo n.º 2
0
 def testLossManyToManyBidirectional(self):
     '''
     Bidirectional messaging between many masters and many slaves with packet loss
     '''
     console.terse("{0}\n".format(self.testLossManyToManyBidirectional.__doc__))
     self.assertTrue(netem.loss(percent=30, correlation=25))
     self.assertEqual(netem.check(), 1)
     self.messagingMultiPeers(masterCount=testing.MULTI_MASTER_COUNT,
                              minionCount=testing.MULTI_MINION_COUNT,
                              msgSize=testing.MSG_SIZE_MED,
                              msgCount=testing.MSG_COUNT_MED,
                              duration=100.0,
                              direction=testing.DIR_BIDIRECTIONAL)