diff options
author | Boaz Leskes <b.leskes@gmail.com> | 2017-06-15 13:24:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-15 13:24:07 +0200 |
commit | 648b4717a490a942d4cb36aefad886509a2c0f03 (patch) | |
tree | bf199c7b950a39454e62bc07d4215a51fcc843e3 /core/src/test/java/org/elasticsearch/action/support | |
parent | 27f12069990f11aab65fd319e507f74ad22cf663 (diff) |
move assertBusy to use CheckException (#25246)
We use assertBusy in many places where the underlying code throw exceptions. Currently we need to wrap those exceptions in a RuntimeException which is ugly.
Diffstat (limited to 'core/src/test/java/org/elasticsearch/action/support')
-rw-r--r-- | core/src/test/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationActionTests.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/core/src/test/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationActionTests.java b/core/src/test/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationActionTests.java index ba488cecb3..29235329d6 100644 --- a/core/src/test/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationActionTests.java +++ b/core/src/test/java/org/elasticsearch/action/support/single/instance/TransportInstanceSingleOperationActionTests.java @@ -275,12 +275,7 @@ public class TransportInstanceSingleOperationActionTests extends ESTestCase { transport.handleLocalError(requestId, new ConnectTransportException(node, "test exception")); // wait until the timeout was triggered and we actually tried to send for the second time - assertBusy(new Runnable() { - @Override - public void run() { - assertThat(transport.capturedRequests().length, equalTo(1)); - } - }); + assertBusy(() -> assertThat(transport.capturedRequests().length, equalTo(1))); // let it fail the second time too requestId = transport.capturedRequests()[0].requestId; |