Code Review
/
doctor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
optimize the fault notification test
[doctor.git]
/
doctor_tests
/
monitor
/
sample.py
diff --git
a/doctor_tests/monitor/sample.py
b/doctor_tests/monitor/sample.py
index
c207cd9
..
9b21750
100644
(file)
--- a/
doctor_tests/monitor/sample.py
+++ b/
doctor_tests/monitor/sample.py
@@
-94,7
+94,9
@@
class Pinger(Thread):
sock.sendto(self.ICMP_ECHO_MESSAGE, (self.ip_addr, 0))
sock.recv(4096)
except socket.timeout:
sock.sendto(self.ICMP_ECHO_MESSAGE, (self.ip_addr, 0))
sock.recv(4096)
except socket.timeout:
- self.log.info("doctor monitor detected at %s" % time.time())
+ detected_time = time.time()
+ self.log.info("doctor monitor detected at %s" % detected_time)
+ self.monitor.detected_time = detected_time
self.monitor.report_error(self.hostname)
self.log.info("ping timeout, quit monitoring...")
self._stopped = True
self.monitor.report_error(self.hostname)
self.log.info("ping timeout, quit monitoring...")
self._stopped = True