示例#1
0
文件: remote.py 项目: rimms/jubatest
 def test_destructor(self):
     p = AsyncRemoteProcess('localhost', ['sleep', '120'], [])
     p.start()
     rawp = p._process
     p = None # run destructor
     time.sleep(1)
     self.assertIsNotNone(rawp.poll())
示例#2
0
 def test_destructor(self):
     p = AsyncRemoteProcess('localhost', ['sleep', '120'], [])
     p.start()
     rawp = p._process
     p = None # run destructor
     time.sleep(1)
     self.assertIsNotNone(rawp.poll())
示例#3
0
 def test_run(self):
     p = AsyncRemoteProcess('localhost', ['/bin/echo', '-n', 'foo'], [])
     p.start()
     for i in range(20): # expecting this command to complete in two second
         time.sleep(0.1)
     p.stop()
     self.assertFalse(p.is_running())
     self.assertEqual(b'foo', p.stdout)
示例#4
0
文件: remote.py 项目: kumagi/jubatest
 def test_run(self):
     p = AsyncRemoteProcess('localhost', ['/bin/echo', '-n', 'foo'], [])
     p.start()
     for i in range(20): # expecting this command to complete in two second
         time.sleep(0.1)
     p.stop()
     self.assertFalse(p.is_running())
     self.assertEqual('foo', p.stdout)
示例#5
0
文件: remote.py 项目: kumagi/jubatest
 def _test():
     p = AsyncRemoteProcess('localhost', ['sleep', '120'], [])
     p.start()
     time.sleep(3)
     p.stop()
示例#6
0
文件: remote.py 项目: rimms/jubatest
 def test_timeout(self):
     p = AsyncRemoteProcess('localhost', ['sleep', '120'], [], 1)
     p.start()
     time.sleep(5)
     self.assertFalse(p.is_running())
示例#7
0
 def test_timeout(self):
     p = AsyncRemoteProcess('localhost', ['sleep', '120'], [], 1)
     p.start()
     time.sleep(5)
     self.assertFalse(p.is_running())
示例#8
0
 def _test():
     p = AsyncRemoteProcess('localhost', ['sleep', '120'], [])
     p.start()
     time.sleep(3)
     p.stop()