コード例 #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)
コード例 #2
0
ファイル: test_road_network.py プロジェクト: DSRCompany/raet
 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)
コード例 #3
0
ファイル: test_road_network.py プロジェクト: DSRCompany/raet
 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)
コード例 #4
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)