修改一些细节, 不影响版本
This commit is contained in:
parent
63cd4b04e8
commit
149d9def89
|
@ -1,5 +1,7 @@
|
||||||
package cn.ecpark.service.usergw;
|
package cn.ecpark.service.usergw;
|
||||||
|
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
@ -26,7 +28,7 @@ public class TestHttp2DubboConfig {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void TestRequestHttp2DubboWithoutConfigMethod() {
|
public void TestRequestHttp2DubboWithoutConfigMethod() {
|
||||||
|
|
||||||
// Test Base Url
|
// Test Base Url
|
||||||
HttpClient client = HttpClient.create();
|
HttpClient client = HttpClient.create();
|
||||||
ResponseReceiver<?> receiver = client.baseUrl("http://localhost:" + serverPort + "/dubbo/hello").headers(
|
ResponseReceiver<?> receiver = client.baseUrl("http://localhost:" + serverPort + "/dubbo/hello").headers(
|
||||||
|
@ -42,7 +44,7 @@ public class TestHttp2DubboConfig {
|
||||||
String content = receiver.responseContent().asString().blockFirst();
|
String content = receiver.responseContent().asString().blockFirst();
|
||||||
Assert.assertNotNull(content);
|
Assert.assertNotNull(content);
|
||||||
Assert.assertEquals(content, "Test-MyHttp2dubbo");
|
Assert.assertEquals(content, "Test-MyHttp2dubbo");
|
||||||
|
|
||||||
receiver = client.baseUrl("http://localhost:" + serverPort + "/dubbo/hello").headers(
|
receiver = client.baseUrl("http://localhost:" + serverPort + "/dubbo/hello").headers(
|
||||||
h -> h.set("method", "Hello"))
|
h -> h.set("method", "Hello"))
|
||||||
.get();
|
.get();
|
||||||
|
@ -71,7 +73,7 @@ public class TestHttp2DubboConfig {
|
||||||
String content = receiver.responseContent().asString().blockLast();
|
String content = receiver.responseContent().asString().blockLast();
|
||||||
Assert.assertNotNull(content);
|
Assert.assertNotNull(content);
|
||||||
Assert.assertEquals(content, "{\"a\": 1, \"b\":\"123\"}");
|
Assert.assertEquals(content, "{\"a\": 1, \"b\":\"123\"}");
|
||||||
|
|
||||||
receiver = client.baseUrl("http://localhost:" + serverPort + "/dubbo/hello").headers(
|
receiver = client.baseUrl("http://localhost:" + serverPort + "/dubbo/hello").headers(
|
||||||
h -> h.set("method", "Say").add("param-types", "java.lang.String").add("params","123"))
|
h -> h.set("method", "Say").add("param-types", "java.lang.String").add("params","123"))
|
||||||
.get();
|
.get();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user