Skip to content

Commit 4004363

Browse files
committed
Ignore Jetty deprecation that will give us the behavior we want
1 parent 268c4e0 commit 4004363

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

servlet/src/jettyTest/java/io/grpc/servlet/JettyTransportTest.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ public void start(ServerListener listener) throws IOException {
7777
ServerConnector sc = (ServerConnector) jettyServer.getConnectors()[0];
7878
HttpConfiguration httpConfiguration = new HttpConfiguration();
7979

80-
// Must be set for several tests to pass, so that the request handling can begin before
81-
// content arrives.
82-
httpConfiguration.setDelayDispatchUntilContent(false);
80+
setDelayDispatchUntilContent(httpConfiguration);
8381

8482
HTTP2CServerConnectionFactory factory =
8583
new HTTP2CServerConnectionFactory(httpConfiguration);
@@ -129,6 +127,16 @@ public List<InternalInstrumented<InternalChannelz.SocketStats>> getListenSocketS
129127
};
130128
}
131129

130+
// The future default appears to be false as people are supposed to be migrate to
131+
// EagerContentHandler, but the default is still true. Seems they messed up the migration
132+
// process here by not flipping the default.
133+
@SuppressWarnings("removal")
134+
private static void setDelayDispatchUntilContent(HttpConfiguration httpConfiguration) {
135+
// Must be set for several tests to pass, so that the request handling can begin before
136+
// content arrives.
137+
httpConfiguration.setDelayDispatchUntilContent(false);
138+
}
139+
132140
@Override
133141
protected InternalServer newServer(int port,
134142
List<ServerStreamTracer.Factory> streamTracerFactories) {

0 commit comments

Comments
 (0)