14 """Thread that sends random weighted requests on a TestService stub."""
23 weight_sum =
sum(weighted_cases.itervalues())
26 val = random.uniform(0, weight_sum)
28 for case
in weighted_cases:
29 partial_sum += weighted_cases[case]
30 if val <= partial_sum:
37 def __init__(self, stub, test_cases, hist, exception_queue, stop_event):
49 start_time = time.time()
50 test_case.test_interoperability(self.
_stub,
None)
51 end_time = time.time()
53 except Exception
as e:
57 "An exception occurred during test {}".
format(