From 92f86826768d4df9eb14367ba07c66af8af9f6b6 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Mon, 20 Jul 2015 09:18:09 +0000
Subject: [PATCH] OPENDJ-1666 CR-7647 forgerock-util 2.0.0 migration
---
opendj-grizzly/src/test/java/org/forgerock/opendj/grizzly/GrizzlyLDAPConnectionTestCase.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/opendj-grizzly/src/test/java/org/forgerock/opendj/grizzly/GrizzlyLDAPConnectionTestCase.java b/opendj-grizzly/src/test/java/org/forgerock/opendj/grizzly/GrizzlyLDAPConnectionTestCase.java
index 9dab53b..8c8471a 100644
--- a/opendj-grizzly/src/test/java/org/forgerock/opendj/grizzly/GrizzlyLDAPConnectionTestCase.java
+++ b/opendj-grizzly/src/test/java/org/forgerock/opendj/grizzly/GrizzlyLDAPConnectionTestCase.java
@@ -49,7 +49,7 @@
import org.forgerock.opendj.ldap.controls.PersistentSearchRequestControl;
import org.forgerock.opendj.ldap.requests.Requests;
import org.forgerock.opendj.ldap.requests.SearchRequest;
-import org.forgerock.util.promise.FailureHandler;
+import org.forgerock.util.promise.ExceptionHandler;
import org.mockito.ArgumentCaptor;
import org.testng.annotations.Test;
@@ -103,8 +103,8 @@
}
SearchResultHandler searchHandler = mock(SearchResultHandler.class);
@SuppressWarnings("unchecked")
- FailureHandler<LdapException> failureHandler = mock(FailureHandler.class);
- connection.searchAsync(request, searchHandler).onFailure(failureHandler);
+ ExceptionHandler<LdapException> exceptionHandler = mock(ExceptionHandler.class);
+ connection.searchAsync(request, searchHandler).thenOnException(exceptionHandler);
// Pass in a time which is guaranteed to trigger expiration.
connection.handleTimeout(System.currentTimeMillis() + 1000000);
@@ -112,7 +112,7 @@
verifyZeroInteractions(searchHandler);
} else {
ArgumentCaptor<LdapException> arg = ArgumentCaptor.forClass(LdapException.class);
- verify(failureHandler).handleError(arg.capture());
+ verify(exceptionHandler).handleException(arg.capture());
assertThat(arg.getValue()).isInstanceOf(TimeoutResultException.class);
assertThat(arg.getValue().getResult().getResultCode()).isEqualTo(
ResultCode.CLIENT_SIDE_TIMEOUT);
--
Gitblit v1.10.0