예제 #1
0
 def testGetOtherVMs_NotConnected(self):
     """Test method for ScalarisVM.getOtherVMs() with a closed connection."""
     vm = ScalarisVM()
     vm.close_connection()
     #self.assertRaises(scalaris.ConnectionError, vm.getOtherVMs(0))
     vm.getOtherVMs(1)
     vm.close_connection()
예제 #2
0
 def testGetOtherVMs_NotConnected(self):
     """Test method for ScalarisVM.getOtherVMs() with a closed connection."""
     vm = ScalarisVM()
     vm.close_connection()
     #self.assertRaises(scalaris.ConnectionError, vm.getOtherVMs(0))
     vm.getOtherVMs(1)
     vm.close_connection()
예제 #3
0
 def _testGetOtherVMs(self, maxVMs):
     """Test method for ScalarisVM.getOtherVMs()."""
     vm = ScalarisVM()
     otherVMs = vm.getOtherVMs(maxVMs)
     self.assertTrue(len(otherVMs) <= maxVMs, "list too long: " + str(otherVMs))
     for otherVMUrl in otherVMs:
         otherVM = ScalarisVM(JSONConnection(otherVMUrl))
         otherVM.getInfo()
         otherVM.close_connection()
     vm.close_connection()
예제 #4
0
 def _testGetOtherVMs(self, maxVMs):
     """Test method for ScalarisVM.getOtherVMs()."""
     vm = ScalarisVM()
     otherVMs = vm.getOtherVMs(maxVMs)
     self.assertTrue(
         len(otherVMs) <= maxVMs, "list too long: " + str(otherVMs))
     for otherVMUrl in otherVMs:
         otherVM = ScalarisVM(JSONConnection(otherVMUrl))
         otherVM.getInfo()
         otherVM.close_connection()
     vm.close_connection()