Merge branch 'apache-3.2' into 3.2.7-release

This commit is contained in:
Albumen Kevin 2023-09-26 16:30:31 +08:00
commit 4655d783e6
2 changed files with 10 additions and 3 deletions

View File

@ -67,7 +67,7 @@ class ReplierDispatcherTest {
ReplierDispatcher dispatcher = new ReplierDispatcher();
dispatcher.addReplier(RpcMessage.class, new RpcMessageHandler());
dispatcher.addReplier(Data.class, (channel, msg) -> new StringMessage("hello world"));
URL url = URL.valueOf("exchange://localhost:" + port + "?" + CommonConstants.TIMEOUT_KEY + "=60000");
URL url = URL.valueOf("exchange://localhost:" + port + "?" + CommonConstants.TIMEOUT_KEY + "=60000&threadpool=cached");
ApplicationModel applicationModel = ApplicationModel.defaultModel();
ApplicationConfig applicationConfig = new ApplicationConfig("provider-app");
applicationConfig.setExecutorManagementMode(EXECUTOR_MANAGEMENT_MODE_DEFAULT);
@ -109,7 +109,7 @@ class ReplierDispatcherTest {
try {
clientExchangeInfo(port);
} catch (Exception e) {
fail();
fail(e);
}
}));
for (Future<?> future : futureList) {
@ -120,7 +120,7 @@ class ReplierDispatcherTest {
}
void clientExchangeInfo(int port) throws Exception {
ExchangeChannel client = Exchangers.connect(URL.valueOf("exchange://localhost:" + port + "?" + CommonConstants.TIMEOUT_KEY + "=5000"));
ExchangeChannel client = Exchangers.connect(URL.valueOf("exchange://localhost:" + port + "?" + CommonConstants.TIMEOUT_KEY + "=60000"));
clients.put(Thread.currentThread().getName(), client);
MockResult result = (MockResult) client.request(new RpcMessage(DemoService.class.getName(), "plus", new Class<?>[]{int.class, int.class}, new Object[]{55, 25})).get();
Assertions.assertEquals(result.getResult(), 80);

View File

@ -0,0 +1,7 @@
###set log levels###
log4j.rootLogger=debug, stdout
###output to the console###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy HH:mm:ss:SSS z}] %t %5p %c{2}: %m%n