HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
test_admin_Node.py
Go to the documentation of this file.
1 '''
2 Created on Feb 14, 2014
3 
4 @author: scorp
5 '''
6 
7 
8 import unittest
9 from Node import Node
10 import test_Constants
11 import time
12 
13 
14 class TestNode(unittest.TestCase):
15 
16  def setUp(self):
17  self.node = None
18 
19 
20  def tearDown(self):
21  pass
22 
23 
25  self.node = Node("localhost", 0, test_Constants.TEST_TIMEOUT)
26  elapsed = self.node.getElapsedTime()
27  self.assertTrue(elapsed >= 0, ">>> Elapsed 1 failed")
28  time.sleep(test_Constants.TEST_TIMEOUT / 1000)
29 
30  elapsed = self.node.getElapsedTime()
31  self.assertTrue(elapsed >= test_Constants.TEST_TIMEOUT, ">>> Elapsed 2 failed")
32 
33 
34 if __name__ == "__main__":
35 # import sys;sys.argv = ['', 'Test.testName']
36  unittest.main()