Improve test reliability by eliminating fixed-duration Thread.sleeps

Description

Tests which use Thread.sleep to wait for some asynchronous process to complete are liable to flicker due to inconsistent running times. It is usually preferable to test some explicit condition repeatedly, timing out if it is not met within a reasonable time period - the test will then be able to continue immediately as soon as the condition is met, and can have a more generous timeout allowance since we will not usually be waiting that long.

The eventually method provides a convenient common way for tests to do this, and should be used where appropriate:

https://r3-cev.atlassian.net/browse/ENT-3362 extends this work to include tests that are only defined for Corda Enterprise.

Assignee

Dominic.Fox@r3.com

Reporter

Dominic.Fox@r3.com

Epic Link

None

Priority

Medium

Engineering Teams

None

Fix versions

Affects versions

Ported to...

None

Sprint

None

Labels

None

Story Points / Dev Days

None

Feature Team

Performance and Platform Sustainability

Severity

Medium
Configure