You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/10/23 08:22:45 UTC
[incubator-servicecomb-java-chassis] 03/08: [SCB-837] make http2
production ready: add Junit Test
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git
commit a4f572e7c81b186106681f26bff06aba529b495d
Author: heyile <he...@huawei.com>
AuthorDate: Wed Oct 10 21:35:37 2018 +0800
[SCB-837] make http2 production ready: add Junit Test
---
.../transport/rest/client/TestTransportClientConfig.java | 11 +++++++++++
.../servicecomb/transport/rest/vertx/TestTransportConfig.java | 8 ++++++++
2 files changed, 19 insertions(+)
diff --git a/transports/transport-rest/transport-rest-client/src/test/java/org/apache/servicecomb/transport/rest/client/TestTransportClientConfig.java b/transports/transport-rest/transport-rest-client/src/test/java/org/apache/servicecomb/transport/rest/client/TestTransportClientConfig.java
index bbc2e75..13a3d7a 100644
--- a/transports/transport-rest/transport-rest-client/src/test/java/org/apache/servicecomb/transport/rest/client/TestTransportClientConfig.java
+++ b/transports/transport-rest/transport-rest-client/src/test/java/org/apache/servicecomb/transport/rest/client/TestTransportClientConfig.java
@@ -37,10 +37,21 @@ public class TestTransportClientConfig {
}
@Test
+ public void getHttp2MultiplexingLimit() {
+ Assert.assertEquals(-1, TransportClientConfig.getHttp2MultiplexingLimit());
+ }
+
+ @Test
+ public void getHttp2ConnectionMaxPoolSize() {
+ Assert.assertEquals(3, TransportClientConfig.getHttp2ConnectionMaxPoolSize());
+ }
+
+ @Test
public void getConnectionKeepAlive() {
Assert.assertTrue(TransportClientConfig.getConnectionKeepAlive());
}
+
@Test
public void getConnectionCompression() {
Assert.assertFalse(TransportClientConfig.getConnectionCompression());
diff --git a/transports/transport-rest/transport-rest-vertx/src/test/java/org/apache/servicecomb/transport/rest/vertx/TestTransportConfig.java b/transports/transport-rest/transport-rest-vertx/src/test/java/org/apache/servicecomb/transport/rest/vertx/TestTransportConfig.java
index bca09be..7493c04 100644
--- a/transports/transport-rest/transport-rest-vertx/src/test/java/org/apache/servicecomb/transport/rest/vertx/TestTransportConfig.java
+++ b/transports/transport-rest/transport-rest-vertx/src/test/java/org/apache/servicecomb/transport/rest/vertx/TestTransportConfig.java
@@ -142,6 +142,14 @@ public class TestTransportConfig {
}
@Test
+ public void testMaxConcurrentStreams() {
+ Assert.assertEquals(200L, TransportConfig.getMaxConcurrentStreams());
+ ArchaiusUtils.setProperty("servicecomb.rest.server.http2.concurrentStreams", 100L);
+ Assert.assertEquals(100L, TransportConfig.getMaxConcurrentStreams());
+ }
+
+
+ @Test
public void testGetMaxInitialLineLength() {
Assert.assertEquals(4096, TransportConfig.getMaxInitialLineLength());
ArchaiusUtils.setProperty("servicecomb.rest.server.maxInitialLineLength", 8000);