Skip to content

Commit

Permalink
validate: launcher: Initialize Test start time outside of wait_process
Browse files Browse the repository at this point in the history
wait_process will be moved to TestManager, so the values used to track
process update must remain inside Test.

Patch 2/4 to make TestManager handle waiting for processes instead of
expecting each Test to do it.
  • Loading branch information
Ramiro Polla authored and tsaunier committed Feb 5, 2015
1 parent 498f700 commit bd4c221
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions validate/launcher/baseclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ def get_current_value(self):
return Result.NOT_RUN

def wait_process(self):
self.last_val = 0
self.last_change_ts = time.time()
self.start_ts = time.time()
while True:
# Check process every second for timeout
self.thread.join(1.0)
Expand Down Expand Up @@ -305,6 +302,10 @@ def run(self):
self.thread = threading.Thread(target=self.thread_wrapper)
self.thread.start()

self.last_val = 0
self.last_change_ts = time.time()
self.start_ts = time.time()

try:
self.wait_process()
except KeyboardInterrupt:
Expand Down

1 comment on commit bd4c221

@thiblahute
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Please sign in to comment.