def test_AllCleansUp(self): _allocation = self.createAllocation(self.requirements, self.allocationInfo) _allocation.free() def validateNotInAll(): self.assertNotIn(_allocation, self.tested.all()) executeCodeWhileAllocationIsDeadOfHeartbeatTimeout(_allocation, validateNotInAll)
def test_CreateCleansUp(self): _allocation = self.createAllocation(self.requirements, self.allocationInfo) _allocation.free() def createCallback(): self.createAllocation(self.requirements, self.allocationInfo) executeCodeWhileAllocationIsDeadOfHeartbeatTimeout(_allocation, createCallback) self.assertNotIn(_allocation, self.tested.all())
def test_DeadForAWhile(self): self.tested.free() executeCodeWhileAllocationIsDeadOfHeartbeatTimeout(self.tested, lambda: None)