daml/ledger/api-server-damlonx/reference-v2
Samir Talwar 45759ccd4d
reference-v2: Make IndexerIT less flaky. (#4426)
* sandbox: Fix RecoveringIndexer so it doesn't wait too long.

If the indexer restart delay is too short, RecoveringIndexer will still
wait a second. This is not an issue in production, because the delay is
typically 10 seconds, but in tests, where we use 100 milliseconds, it's
enough to make the test flaky.

We need to wait in one-second increments to allow for quick
cancellation; we don't want the user to have to wait 10 seconds if the
process is terminated while restarting.

The fix is to take the minimum of 1 second and the remaining restart
time.

This also adds STDOUT logging back into the tests; it was invaluable
when debugging the issue.

I am not including a changelog entry, because this only affects tests.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox: Add an assertion in IndexerIT to ensure it stops quickly.

We already test the logs, but it's probably wise to test that the
indexer doesn't wait 10 seconds.
2020-02-06 14:24:53 +00:00
..
src reference-v2: Make IndexerIT less flaky. (#4426) 2020-02-06 14:24:53 +00:00
BUILD.bazel reference-v2: Make IndexerIT less flaky. (#4426) 2020-02-06 14:24:53 +00:00