test[gateway]: gateway test

This commit is contained in:
godotg
2024-01-13 18:56:37 +08:00
parent c8a4f94142
commit 2b1841e759
2 changed files with 2 additions and 3 deletions
@@ -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
@@ -26,7 +26,7 @@
<!--1.声明自己是个消费者 2.消费的接口是服务提供者是myProvider1提供的具体实现-->
<net:consumers>
<net:consumer consumer="myProvider1"/>
<net:consumer consumer="provider1"/>
</net:consumers>
</net:config>