mirror of
https://github.com/wassname/ray.git
synced 2026-08-12 12:20:11 +08:00
Move calls to ray.worker.cleanup into tearDown part of tests for isolation. (#1433)
This commit is contained in:
committed by
Philipp Moritz
parent
4b1c8be4fe
commit
f32c0c8ec1
@@ -16,6 +16,8 @@ if sys.version_info >= (3, 0):
|
||||
|
||||
|
||||
class MicroBenchmarkTest(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
ray.worker.cleanup()
|
||||
|
||||
def testTiming(self):
|
||||
reload(test_functions)
|
||||
@@ -89,8 +91,6 @@ class MicroBenchmarkTest(unittest.TestCase):
|
||||
print(" worst: {}".format(elapsed_times[999]))
|
||||
# average_elapsed_time should be about 0.00087.
|
||||
|
||||
ray.worker.cleanup()
|
||||
|
||||
def testCache(self):
|
||||
ray.init(num_workers=1)
|
||||
|
||||
@@ -115,8 +115,6 @@ class MicroBenchmarkTest(unittest.TestCase):
|
||||
print("WARNING: The caching test was too slow. "
|
||||
"d = {}, b = {}".format(d, b))
|
||||
|
||||
ray.worker.cleanup()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main(verbosity=2)
|
||||
|
||||
Reference in New Issue
Block a user