Skip to content

Commit

Permalink
make wait time in tests same throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
jmazzitelli committed Jan 31, 2015
1 parent 8ee6b23 commit 6914f5b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void testSendRPC() throws Exception {

// use the future.get(timeout) method and make sure it returns the same
try {
receivedSpecificMessage = future.get(1, TimeUnit.SECONDS);
receivedSpecificMessage = future.get(30, TimeUnit.SECONDS);
} catch (Exception e) {
assert false : "Future failed to obtain response message: " + e;
}
Expand Down Expand Up @@ -149,7 +149,7 @@ public void testSendRPCAndUseListenableFuture() throws Exception {
// wait for the message to flow
SpecificMessage receivedSpecificMessage = null;
try {
receivedSpecificMessage = futureCallback.getResult(10, TimeUnit.SECONDS);
receivedSpecificMessage = futureCallback.getResult(30, TimeUnit.SECONDS);
} catch (Throwable t) {
assert false : "Future failed to obtain response message: " + t;
}
Expand All @@ -164,7 +164,7 @@ public void testSendRPCAndUseListenableFuture() throws Exception {

// use the future.get(timeout) method and make sure it returns the same
try {
receivedSpecificMessage = future.get(1, TimeUnit.SECONDS);
receivedSpecificMessage = future.get(30, TimeUnit.SECONDS);
} catch (Exception e) {
assert false : "Future failed to obtain response message: " + e;
}
Expand Down Expand Up @@ -218,7 +218,7 @@ public void testSendAndListen() throws Exception {
clientSideProcessor.sendAndListen(producerContext, specificMessage, responseListener);

// wait for the message to flow
boolean gotMessage = latch.await(5, TimeUnit.SECONDS);
boolean gotMessage = latch.await(30, TimeUnit.SECONDS);
if (!gotMessage) {
errors.add("Timed out waiting for response message - it never showed up");
}
Expand Down Expand Up @@ -346,7 +346,7 @@ public void testRPCCancel() throws Exception {

// try to get the message using get(timeout) method
try {
future.get(1, TimeUnit.SECONDS);
future.get(30, TimeUnit.SECONDS);
} catch (CancellationException expected) {
// expected
} catch (Exception e) {
Expand All @@ -364,7 +364,7 @@ public void testRPCCancel() throws Exception {

// try to get the message using the future callback
try {
futureCallback.getResult(1, TimeUnit.SECONDS);
futureCallback.getResult(30, TimeUnit.SECONDS);
} catch (CancellationException expected) {
// expected
} catch (Throwable t) {
Expand Down

0 comments on commit 6914f5b

Please sign in to comment.