##// END OF EJS Templates
test very short timeouts...
MinRK -
Show More
@@ -156,16 +156,24 b' class TestLoadBalancedView(ClusterTestCase):'
156 156
157 157 def test_retries(self):
158 158 view = self.view
159 view.timeout = 1 # prevent hang if this doesn't behave
160 159 def fail():
161 160 assert False
162 161 for r in range(len(self.client)-1):
163 162 with view.temp_flags(retries=r):
164 163 self.assertRaisesRemote(AssertionError, view.apply_sync, fail)
165 164
166 with view.temp_flags(retries=len(self.client), timeout=0.25):
165 with view.temp_flags(retries=len(self.client), timeout=0.1):
167 166 self.assertRaisesRemote(error.TaskTimeout, view.apply_sync, fail)
168 167
168 def test_short_timeout(self):
169 view = self.view
170 def fail():
171 import time
172 time.sleep(0.25)
173 assert False
174 with view.temp_flags(retries=1, timeout=0.01):
175 self.assertRaisesRemote(AssertionError, view.apply_sync, fail)
176
169 177 def test_invalid_dependency(self):
170 178 view = self.view
171 179 with view.temp_flags(after='12345'):
General Comments 0
You need to be logged in to leave comments. Login now