Closed oxisto closed 3 years ago
It may be worth looking into https://github.com/awaitility/awaitility. It provides a pretty good flow for waiting or testing on things like:
while (!clientConnection.isConnected || !serverConnection.isConnected) { Thread.sleep(50) }
This would be written in awaitility like
await().until(() -> clientConnection.isConnected && serverConnection.isConnected)
It also allows for fine-grained timeouts like this await().atMost(1, SECONDS).until(X) as well as specifying the polling interval.
await().atMost(1, SECONDS).until(X)
Just a suggestions, since I have seen a lot of timing-related stuff in the test cases and this might help out there.
Closed by https://github.com/industrial-data-space/idscp2-java/commit/64fe649dce05314e5180ad5ab0e320a58ed63929
It may be worth looking into https://github.com/awaitility/awaitility. It provides a pretty good flow for waiting or testing on things like:
This would be written in awaitility like
It also allows for fine-grained timeouts like this
await().atMost(1, SECONDS).until(X)
as well as specifying the polling interval.Just a suggestions, since I have seen a lot of timing-related stuff in the test cases and this might help out there.