summaryrefslogtreecommitdiff
path: root/src/test/java/com/orbekk/protobuf/ProtobufFunctionalTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/orbekk/protobuf/ProtobufFunctionalTest.java')
-rw-r--r--src/test/java/com/orbekk/protobuf/ProtobufFunctionalTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/java/com/orbekk/protobuf/ProtobufFunctionalTest.java b/src/test/java/com/orbekk/protobuf/ProtobufFunctionalTest.java
index bf30f59..a1661d2 100644
--- a/src/test/java/com/orbekk/protobuf/ProtobufFunctionalTest.java
+++ b/src/test/java/com/orbekk/protobuf/ProtobufFunctionalTest.java
@@ -161,4 +161,22 @@ public class ProtobufFunctionalTest {
server.interrupt();
stop.await();
}
+
+ @org.junit.Test public void testTimout() throws Exception {
+ Test.Type1 request = Test.Type1.newBuilder().build();
+ final CountDownLatch stop = new CountDownLatch(1);
+
+ final Rpc rpc = new Rpc();
+ rpc.setTimout(1);
+ service.testC(rpc, request, new RpcCallback<Type2>() {
+ @Override public void run(Type2 result) {
+ stop.countDown();
+ }
+ });
+ rpc.await();
+ assertThat(rpc.failed(), is(true));
+ assertThat(rpc.errorText(), is("timeout"));
+ returnC.countDown();
+ stop.await();
+ }
}