(self, cmd, timeout=500)
| 35 | pass |
| 36 | |
| 37 | def wait_for_command(self, cmd, timeout=500): |
| 38 | # wait for monitor to receive cmd |
| 39 | found = False |
| 40 | interval = 0.2 |
| 41 | |
| 42 | while not found and timeout > 0: |
| 43 | while len(self.monitor) == 0: |
| 44 | # wait for an item |
| 45 | time.sleep(interval) |
| 46 | timeout -= interval |
| 47 | item = self.monitor.pop() |
| 48 | found = cmd in item['command'] |
| 49 | |
| 50 | if found is False: |
| 51 | raise Exception(f"missing expected replicated command: {cmd}") |
| 52 | |
| 53 | def wait_for_effect(self): |
| 54 | self.wait_for_command('GRAPH.EFFECT') |
no outgoing calls
no test coverage detected