Make tests more informative (#372)

* Make tests more informative

* Change grpc status checks to warning instead of fatal
This commit is contained in:
Robert Nishihara
2016-08-11 12:40:55 -07:00
committed by Philipp Moritz
parent b0ecff69ad
commit fd353250c8
4 changed files with 162 additions and 192 deletions
+9 -5
View File
@@ -6,12 +6,18 @@ import numpy as np
import test_functions
class MicroBenchmarkTest(unittest.TestCase):
class TestMicroBenchmarks(unittest.TestCase):
def testTiming(self):
@classmethod
def setUpClass(cls):
reload(test_functions)
ray.init(start_ray_local=True, num_workers=3)
@classmethod
def tearDownClass(cls):
ray.worker.cleanup()
def test_timing(self):
# measure the time required to submit a remote task to the scheduler
elapsed_times = []
for _ in range(1000):
@@ -77,7 +83,5 @@ class MicroBenchmarkTest(unittest.TestCase):
print " worst: {}".format(elapsed_times[999])
# average_elapsed_time should be about 0.00087
ray.worker.cleanup()
if __name__ == "__main__":
unittest.main()
unittest.main(verbosity=2)