pioneers / shepherd

baa
Apache License 2.0
2 stars 2 forks source link

Timeouts for WAIT commands #49

Open FIREdog5 opened 3 years ago

FIREdog5 commented 3 years ago

add a timeout for wait commands, after which the test will fail. Maybe set a default timeout and add an UNTIL option to WAIT?

FIREdog5 commented 3 years ago

ok, there are several parts to this:

  1. decide how to implement time outs:
    • spawn new thread for each WAIT and have these yield to the events queue
    • use the queue.get(block = True, timeout = <shortest>) and recalculate the timeout whenever an event is gotten from the queue.
      • theoretically cleaner
      • might make part 3 harder
  2. decide how to specify timeouts
    • a global timeout statement, and individual timeout commands for WAITs?
  3. write a system to detect when chained waits timeout. (This is kinda the opposite of when we decide to move on)
    • for OR, both must time out
    • for AND, just one must time out
    • can maybe exploit python's ands and ors, but inverting the inputs? not (not timedout or not timedout) would work for the or
FIREdog5 commented 3 years ago
  1. using queue.get's timeout's
  2. global timeouts only.
  3. skip this.