M Monis Ahmed Khan
M Monis Ahmed Khan

Reputation: 640

How to wait for a async void method to complete its task?

In Java, we have the Awaitility class, in which we can wait for a boolean returning method to return true or false.

How can we do this for a void method?

Upvotes: 8

Views: 4580

Answers (1)

Sergii Pozharov
Sergii Pozharov

Reputation: 17828

await().untilAsserted(() -> someVoidMethod());

Upvotes: 17

Related Questions