コード例 #1
0
ファイル: xdd_transfer_manager_test.py プロジェクト: yoyz/xdd
 def test_empty(self):
     """Test calling createFlows without adequate data"""
     tm = TransferManager()
     try:
         rc = tm.createFlows()
         self.assertEqual(0, 1)
     except:
         self.assertEqual(1, 1)
コード例 #2
0
 def test_empty(self):
     """Test calling createFlows without adequate data"""
     tm = TransferManager()
     try:
         rc = tm.createFlows()
         self.assertEqual(0, 1)
     except:
         self.assertEqual(1, 1)
コード例 #3
0
ファイル: xdd_factory_test.py プロジェクト: DaElf/xdd
 def testTransferManagerSource(self):
     """
     Test iface converter using a spec directly from the TransferManager
     """
     tm = TransferManager()
     tm.addSource(None, "localhost", "localhost", 1)
     
     factory = EndpointFactory(0,
                               False,False,False,False, '', [],
                               False,False,False,False, '', [])
     ifs = factory.createIfaceList(tm.sources[0])
     self.assertEqual(1, len(ifs))
     self.assertEqual(('localhost', TEST_PORT, 1, ), ifs[0])
コード例 #4
0
    def test_remote_mem_to_remote_mem(self):
        """Test a remote mem to remote mem transfer"""
        # Get the hostname
        import platform
        host = platform.node()
        self.assertNotEqual(0, len(host))

        # Test using hostname
        tm = TransferManager()
        tm.setXddPath('')
        tm.setRequestSize(1024*1024)
        tm.setTransferSize(1024*1024*1024*20)
        tm.setSourceTarget("/dev/zero")
        tm.setSinkTarget("/dev/null")
        tm.addSource(None, host, host, 4, [host])
        tm.addSink(None, host, host, 4, [host])
        rc = tm.createEndpoints()
        self.assertEqual(0, rc)
        rc = tm.startTransfer("/dev/zero", "/dev/null")
        self.assertEqual(0, rc)
        rc = tm.monitorTransfer(1)
        self.assertEqual(0, rc)
        rc = tm.cleanupEndpoints()
        self.assertEqual(0, rc)
コード例 #5
0
 def test_local_mem_to_mem(self):
     """Test a local mem to local mem transfer"""
     tm = TransferManager()
     tm.setXddPath('bin')
     tm.setRequestSize(1024*1024)
     tm.setTransferSize(1024*1024*1024*20)
     tm.setSourceTarget("/dev/zero")
     tm.setSinkTarget("/dev/null")
     tm.addSource(None, "localhost", "localhost", 1, ['localhost'])
     tm.addSink(None, "localhost", "localhost", 1)
     rc = tm.createEndpoints()
     self.assertEqual(0, rc)
     rc = tm.startTransfer("/dev/zero", "/dev/null")
     self.assertEqual(0, rc)
     rc = tm.monitorTransfer(1)
     self.assertEqual(0, rc)
     rc = tm.cleanupEndpoints()
     self.assertEqual(0, rc)
コード例 #6
0
 def test_single_file_with_restart(self):
     tm = TransferManager()
     tm.setXddPath('bin')
     tm.setRequestSize(1024*1024)
     tm.setTransferSize(1024*1024*1024*20)
     tm.setSourceTarget("/dev/zero")
     tm.setSinkTarget("/dev/null")
     tm.addSource(None, "localhost", "localhost", 6)
     tm.addSink(None, "localhost", "localhost", 6)
     rc = tm.createEndpoints()
     self.assertEqual(0, rc)
     rc = tm.startTransfer("/dev/zero", "/dev/null")
     self.assertEqual(0, rc)
     rc = tm.monitorTransfer(1)
     self.assertEqual(0, rc)
     rc = tm.cleanupEndpoints()
     self.assertEqual(0, rc)
     pass
コード例 #7
0
ファイル: xdd_transfer_manager_test.py プロジェクト: yoyz/xdd
    def test_remote_mem_to_remote_mem(self):
        """Test a remote mem to remote mem transfer"""
        # Get the hostname
        import platform
        host = platform.node()
        self.assertNotEqual(0, len(host))

        # Test using hostname
        tm = TransferManager()
        tm.setXddPath('')
        tm.setRequestSize(1024 * 1024)
        tm.setTransferSize(1024 * 1024 * 1024 * 20)
        tm.setSourceTarget("/dev/zero")
        tm.setSinkTarget("/dev/null")
        tm.addSource(None, host, host, 4, [host])
        tm.addSink(None, host, host, 4, [host])
        rc = tm.createEndpoints()
        self.assertEqual(0, rc)
        rc = tm.startTransfer("/dev/zero", "/dev/null")
        self.assertEqual(0, rc)
        rc = tm.monitorTransfer(1)
        self.assertEqual(0, rc)
        rc = tm.cleanupEndpoints()
        self.assertEqual(0, rc)
コード例 #8
0
ファイル: xdd_transfer_manager_test.py プロジェクト: yoyz/xdd
 def test_local_mem_to_mem(self):
     """Test a local mem to local mem transfer"""
     tm = TransferManager()
     tm.setXddPath('bin')
     tm.setRequestSize(1024 * 1024)
     tm.setTransferSize(1024 * 1024 * 1024 * 20)
     tm.setSourceTarget("/dev/zero")
     tm.setSinkTarget("/dev/null")
     tm.addSource(None, "localhost", "localhost", 1, ['localhost'])
     tm.addSink(None, "localhost", "localhost", 1)
     rc = tm.createEndpoints()
     self.assertEqual(0, rc)
     rc = tm.startTransfer("/dev/zero", "/dev/null")
     self.assertEqual(0, rc)
     rc = tm.monitorTransfer(1)
     self.assertEqual(0, rc)
     rc = tm.cleanupEndpoints()
     self.assertEqual(0, rc)
コード例 #9
0
ファイル: xdd_transfer_manager_test.py プロジェクト: yoyz/xdd
 def test_single_file_with_restart(self):
     tm = TransferManager()
     tm.setXddPath('bin')
     tm.setRequestSize(1024 * 1024)
     tm.setTransferSize(1024 * 1024 * 1024 * 20)
     tm.setSourceTarget("/dev/zero")
     tm.setSinkTarget("/dev/null")
     tm.addSource(None, "localhost", "localhost", 6)
     tm.addSink(None, "localhost", "localhost", 6)
     rc = tm.createEndpoints()
     self.assertEqual(0, rc)
     rc = tm.startTransfer("/dev/zero", "/dev/null")
     self.assertEqual(0, rc)
     rc = tm.monitorTransfer(1)
     self.assertEqual(0, rc)
     rc = tm.cleanupEndpoints()
     self.assertEqual(0, rc)
     pass