From 149d9def89fc1b8dc5e49f2e391cd3493720f16d Mon Sep 17 00:00:00 2001 From: huangsimin Date: Fri, 19 Jul 2019 17:35:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=BA=9B=E7=BB=86?= =?UTF-8?q?=E8=8A=82,=20=E4=B8=8D=E5=BD=B1=E5=93=8D=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/ecpark/service/usergw/TestHttp2DubboConfig.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usergw-service/src/test/java/cn/ecpark/service/usergw/TestHttp2DubboConfig.java b/usergw-service/src/test/java/cn/ecpark/service/usergw/TestHttp2DubboConfig.java index 815b688..78e352a 100644 --- a/usergw-service/src/test/java/cn/ecpark/service/usergw/TestHttp2DubboConfig.java +++ b/usergw-service/src/test/java/cn/ecpark/service/usergw/TestHttp2DubboConfig.java @@ -1,5 +1,7 @@ package cn.ecpark.service.usergw; +import java.util.LinkedHashMap; + import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @@ -26,7 +28,7 @@ public class TestHttp2DubboConfig { @Test public void TestRequestHttp2DubboWithoutConfigMethod() { - + // Test Base Url HttpClient client = HttpClient.create(); ResponseReceiver receiver = client.baseUrl("http://localhost:" + serverPort + "/dubbo/hello").headers( @@ -42,7 +44,7 @@ public class TestHttp2DubboConfig { String content = receiver.responseContent().asString().blockFirst(); Assert.assertNotNull(content); Assert.assertEquals(content, "Test-MyHttp2dubbo"); - + receiver = client.baseUrl("http://localhost:" + serverPort + "/dubbo/hello").headers( h -> h.set("method", "Hello")) .get(); @@ -71,7 +73,7 @@ public class TestHttp2DubboConfig { String content = receiver.responseContent().asString().blockLast(); Assert.assertNotNull(content); Assert.assertEquals(content, "{\"a\": 1, \"b\":\"123\"}"); - + receiver = client.baseUrl("http://localhost:" + serverPort + "/dubbo/hello").headers( h -> h.set("method", "Say").add("param-types", "java.lang.String").add("params","123")) .get();