mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-20 12:24:54 +00:00
test[gateway]: gateway test
This commit is contained in:
@@ -29,7 +29,6 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* 这是客户端连接网关,网关转发到服务提供者的测试用例
|
||||
@@ -75,7 +74,7 @@ public class GatewayTest {
|
||||
*/
|
||||
@Test
|
||||
public void startGateway() {
|
||||
var context = new ClassPathXmlApplicationContext("gateway/gateway_consistent_session_config.xml");
|
||||
var context = new ClassPathXmlApplicationContext("gateway/gateway_config.xml");
|
||||
SessionUtils.printSessionInfo();
|
||||
|
||||
// 注意:这里创建的是GatewayServer里面是GatewayRouteHandler(而不是BaseRouteHandler),里面会通过ConsumerSession把消息转发到Provider
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
|
||||
<!--1.声明自己是个消费者 2.消费的接口是服务提供者是myProvider1提供的具体实现-->
|
||||
<net:consumers>
|
||||
<net:consumer consumer="myProvider1"/>
|
||||
<net:consumer consumer="provider1"/>
|
||||
</net:consumers>
|
||||
|
||||
</net:config>
|
||||
Reference in New Issue
Block a user