quil-lang / qvm

The high-performance and featureful Quil simulator.
Other
411 stars 57 forks source link

Retry with backoff when waiting for a given state in app-ng tests #249

Closed appleby closed 4 years ago

appleby commented 4 years ago

Previously, tests that waited for a PERSISTENT-QVM or JOB to reach a particular state would just blindly loop repeating the request and hope for the best. This commit adds a WAIT-FOR function that retries the request with an increasing backoff delay between failures.

I don't know if http requests suddenly got faster or if something in the QVM suddenly got slower, but I noticed the wait/resume test suddenly started failing on my laptop without this change.