SeattleTestbed / utf

Unit Test Framework for SeattleTestbed
MIT License
1 stars 9 forks source link

Integration test for time server failing #43

Closed choksi81 closed 10 years ago

choksi81 commented 10 years ago

I get this error when trying to run the time server integration test. It seems like it terminates before it can send out an error e-mail.

integrationtester@blackbox:~/cron_tests/timeserver_tests$ python test_time_servers_running.py
Tue Jan  7 12:50:34 2014 : Looking up time_servers
Traceback (most recent call last):
  File "test_time_servers_running.py", line 44, in <module>
    main()
  File "test_time_servers_running.py", line 34, in main
    servers = centralizedadvertise_lookup("time_server")
  File "/home/integrationtester/cron_tests/timeserver_tests/centralizedadvertise_repy.py", line 52, in centralizedadvertise_lookup
    sockobj = timeout_openconn(servername,serverport, timeout=10)
  File "/home/integrationtester/cron_tests/timeserver_tests/sockettimeout_repy.py", line 95, in timeout_openconn
    tsock.connect((desthost, destport))
  File "/home/integrationtester/cron_tests/timeserver_tests/sockettimeout_repy.py", line 203, in connect
    self._openconn()
  File "/home/integrationtester/cron_tests/timeserver_tests/sockettimeout_repy.py", line 277, in _openconn
    self.sockobj = openconn(destip, destport)
  File "/home/integrationtester/cron_tests/timeserver_tests/emulcomm.py", line 1339, in openconn
    comminfo[handle]['socket'].connect((desthost,destport))
  File "<string>", line 1, in connect
socket.gaierror: (-2, 'Name or service not known')

The following needs to be done:

choksi81 commented 10 years ago

Author: leonwlaw Turns out the issue was because the seattlelib that the test was running on was outdated. I have updated it but will also change the code to not fail silently. I will do this by moving everything in the test (after the e-mail init code) to a try...except, where upon any exception, an e-mail will be sent out with a traceback.

choksi81 commented 10 years ago

Author: leonwlaw Fixed with r6949.