mirror of https://github.com/grpc/grpc-java.git
Add 10s timeouts to integration tests
This commit is contained in:
parent
65d64cd934
commit
62f4399e26
|
|
@ -131,12 +131,12 @@ public abstract class AbstractTransportTest {
|
||||||
|
|
||||||
protected abstract ChannelImpl createChannel();
|
protected abstract ChannelImpl createChannel();
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void emptyUnary() throws Exception {
|
public void emptyUnary() throws Exception {
|
||||||
assertEquals(Empty.getDefaultInstance(), blockingStub.emptyCall(Empty.getDefaultInstance()));
|
assertEquals(Empty.getDefaultInstance(), blockingStub.emptyCall(Empty.getDefaultInstance()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void largeUnary() throws Exception {
|
public void largeUnary() throws Exception {
|
||||||
final SimpleRequest request = SimpleRequest.newBuilder()
|
final SimpleRequest request = SimpleRequest.newBuilder()
|
||||||
.setResponseSize(314159)
|
.setResponseSize(314159)
|
||||||
|
|
@ -153,7 +153,7 @@ public abstract class AbstractTransportTest {
|
||||||
assertEquals(goldenResponse, blockingStub.unaryCall(request));
|
assertEquals(goldenResponse, blockingStub.unaryCall(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void serverStreaming() throws Exception {
|
public void serverStreaming() throws Exception {
|
||||||
final StreamingOutputCallRequest request = StreamingOutputCallRequest.newBuilder()
|
final StreamingOutputCallRequest request = StreamingOutputCallRequest.newBuilder()
|
||||||
.setResponseType(PayloadType.COMPRESSABLE)
|
.setResponseType(PayloadType.COMPRESSABLE)
|
||||||
|
|
@ -195,7 +195,7 @@ public abstract class AbstractTransportTest {
|
||||||
assertEquals(goldenResponses, recorder.getValues());
|
assertEquals(goldenResponses, recorder.getValues());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void clientStreaming() throws Exception {
|
public void clientStreaming() throws Exception {
|
||||||
final List<StreamingInputCallRequest> requests = Arrays.asList(
|
final List<StreamingInputCallRequest> requests = Arrays.asList(
|
||||||
StreamingInputCallRequest.newBuilder()
|
StreamingInputCallRequest.newBuilder()
|
||||||
|
|
@ -228,7 +228,7 @@ public abstract class AbstractTransportTest {
|
||||||
assertEquals(goldenResponse, responseObserver.firstValue().get());
|
assertEquals(goldenResponse, responseObserver.firstValue().get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout=5000)
|
@Test(timeout = 10000)
|
||||||
public void pingPong() throws Exception {
|
public void pingPong() throws Exception {
|
||||||
final List<StreamingOutputCallRequest> requests = Arrays.asList(
|
final List<StreamingOutputCallRequest> requests = Arrays.asList(
|
||||||
StreamingOutputCallRequest.newBuilder()
|
StreamingOutputCallRequest.newBuilder()
|
||||||
|
|
@ -291,7 +291,7 @@ public abstract class AbstractTransportTest {
|
||||||
verifyNoMoreInteractions(responseObserver);
|
verifyNoMoreInteractions(responseObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void emptyStream() throws Exception {
|
public void emptyStream() throws Exception {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
StreamObserver<StreamingOutputCallResponse> responseObserver = mock(StreamObserver.class);
|
StreamObserver<StreamingOutputCallResponse> responseObserver = mock(StreamObserver.class);
|
||||||
|
|
@ -302,7 +302,7 @@ public abstract class AbstractTransportTest {
|
||||||
verifyNoMoreInteractions(responseObserver);
|
verifyNoMoreInteractions(responseObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void cancelAfterBegin() throws Exception {
|
public void cancelAfterBegin() throws Exception {
|
||||||
StreamRecorder<StreamingInputCallResponse> responseObserver = StreamRecorder.create();
|
StreamRecorder<StreamingInputCallResponse> responseObserver = StreamRecorder.create();
|
||||||
StreamObserver<StreamingInputCallRequest> requestObserver =
|
StreamObserver<StreamingInputCallRequest> requestObserver =
|
||||||
|
|
@ -313,7 +313,7 @@ public abstract class AbstractTransportTest {
|
||||||
assertEquals(Status.CANCELLED, Status.fromThrowable(responseObserver.getError()));
|
assertEquals(Status.CANCELLED, Status.fromThrowable(responseObserver.getError()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void cancelAfterFirstResponse() throws Exception {
|
public void cancelAfterFirstResponse() throws Exception {
|
||||||
final StreamingOutputCallRequest request = StreamingOutputCallRequest.newBuilder()
|
final StreamingOutputCallRequest request = StreamingOutputCallRequest.newBuilder()
|
||||||
.addResponseParameters(ResponseParameters.newBuilder()
|
.addResponseParameters(ResponseParameters.newBuilder()
|
||||||
|
|
@ -342,7 +342,7 @@ public abstract class AbstractTransportTest {
|
||||||
verifyNoMoreInteractions(responseObserver);
|
verifyNoMoreInteractions(responseObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void fullDuplexCallShouldSucceed() throws Exception {
|
public void fullDuplexCallShouldSucceed() throws Exception {
|
||||||
// Build the request.
|
// Build the request.
|
||||||
List<Integer> responseSizes = Arrays.asList(50, 100, 150, 200);
|
List<Integer> responseSizes = Arrays.asList(50, 100, 150, 200);
|
||||||
|
|
@ -375,7 +375,7 @@ public abstract class AbstractTransportTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void halfDuplexCallShouldSucceed() throws Exception {
|
public void halfDuplexCallShouldSucceed() throws Exception {
|
||||||
// Build the request.
|
// Build the request.
|
||||||
List<Integer> responseSizes = Arrays.asList(50, 100, 150, 200);
|
List<Integer> responseSizes = Arrays.asList(50, 100, 150, 200);
|
||||||
|
|
@ -407,7 +407,7 @@ public abstract class AbstractTransportTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void streamingOutputShouldBeFlowControlled() throws Exception {
|
public void streamingOutputShouldBeFlowControlled() throws Exception {
|
||||||
// Create the call object.
|
// Create the call object.
|
||||||
Call<StreamingOutputCallRequest, StreamingOutputCallResponse> call =
|
Call<StreamingOutputCallRequest, StreamingOutputCallResponse> call =
|
||||||
|
|
@ -476,7 +476,7 @@ public abstract class AbstractTransportTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.junit.Test
|
@Test(timeout = 10000)
|
||||||
public void exchangeContextUnaryCall() throws Exception {
|
public void exchangeContextUnaryCall() throws Exception {
|
||||||
TestServiceGrpc.TestServiceBlockingStub stub =
|
TestServiceGrpc.TestServiceBlockingStub stub =
|
||||||
TestServiceGrpc.newBlockingStub(channel);
|
TestServiceGrpc.newBlockingStub(channel);
|
||||||
|
|
@ -500,7 +500,7 @@ public abstract class AbstractTransportTest {
|
||||||
Assert.assertEquals(contextValue, trailersCapture.get().get(METADATA_KEY));
|
Assert.assertEquals(contextValue, trailersCapture.get().get(METADATA_KEY));
|
||||||
}
|
}
|
||||||
|
|
||||||
@org.junit.Test
|
@Test(timeout = 10000)
|
||||||
public void exchangeContextStreamingCall() throws Exception {
|
public void exchangeContextStreamingCall() throws Exception {
|
||||||
TestServiceGrpc.TestServiceStub stub = TestServiceGrpc.newStub(channel);
|
TestServiceGrpc.TestServiceStub stub = TestServiceGrpc.newStub(channel);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
public class StubConfigTest {
|
public class StubConfigTest {
|
||||||
|
|
||||||
@Test
|
@Test(timeout = 10000)
|
||||||
public void testConfigureTimeout() {
|
public void testConfigureTimeout() {
|
||||||
// Create a default stub
|
// Create a default stub
|
||||||
TestServiceGrpc.TestServiceBlockingStub stub =
|
TestServiceGrpc.TestServiceBlockingStub stub =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue