Skip to content

Commit

Permalink
Add javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
henningandersen committed Jan 13, 2020
1 parent 3087981 commit 198651b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ public void testCompleteWith() {
assertThat(expectThrows(ExecutionException.class, onFailureListener::get).getCause(), instanceOf(IOException.class));
}

/**
* Test that map passes the output of the function to its delegate listener and that exceptions in the function are propagated to the
* onFailure handler. Also verify that exceptions from ActionListener.onResponse does not invoke onFailure, since it is the
* responsibility of the ActionListener implementation (the client of the API) to handle exceptions in onResponse and onFailure.
*/
public void testMap() {
AtomicReference<Exception> exReference = new AtomicReference<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ public void testIndexNameInResponse() {
assertEquals("Should have index name in response", "foo", response.index());
}

/**
* Test that when creating a new index successfully, a failure in the ActionListener's onResponse does not result in a call to
* onFailure. It is the responsibility of the caller to handle exceptions in the ActionListener's onResponse and onFailure methods.
*/
public void testOnResponseFailureOnMaster() throws Exception {
final String exceptionMessage = randomAlphaOfLength(10);
final Logger logger = LogManager.getLogger(ClusterApplierService.class);
Expand Down

0 comments on commit 198651b

Please sign in to comment.