This is an automated email from the ASF dual-hosted git repository.
zrlw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-integration-cases.git
The following commit(s) were added to refs/heads/main by this push:
new af50ba06 Change dubbo-samples-test-11137 database to mysql (#87)
af50ba06 is described below
commit af50ba0689ba3db87071109958198778175e1b9c
Author: zrlw <[email protected]>
AuthorDate: Thu Nov 13 16:02:39 2025 +0800
Change dubbo-samples-test-11137 database to mysql (#87)
---
.../case-configuration.yml | 43 ++++++++--
.../src/test/resources/log4j2-test.xml | 29 -------
.../src/test/resources/nacos-logback-stdout.xml | 91 ++++++++++++++++++++++
3 files changed, 128 insertions(+), 35 deletions(-)
diff --git a/99-integration/dubbo-samples-test-11137/case-configuration.yml
b/99-integration/dubbo-samples-test-11137/case-configuration.yml
index 8515f731..8f0e0bf6 100644
--- a/99-integration/dubbo-samples-test-11137/case-configuration.yml
+++ b/99-integration/dubbo-samples-test-11137/case-configuration.yml
@@ -20,15 +20,46 @@ services:
zookeeper:
image: zookeeper:latest
+ nacos-mysql:
+ image: nacos-mysql:5.7
+ environment:
+ - MYSQL_DATABASE=nacos_devtest
+ - MYSQL_ROOT_PASSWORD=root
+ - MYSQL_USER=nacos
+ - MYSQL_PASSWORD=nacos
+ expose:
+ - 3306
+ healthcheck:
+ # mysql host MUST be ip address, if the host is localhost, may
connect via socket file, the port will be ignored
+ test: [ "CMD", "mysqladmin" ,"ping", "-h", "127.0.0.1" ]
+ interval: 5s
+ timeout: 5s
+ retries: 20
+
nacos:
image: nacos/nacos-server:v2.1.2-slim
environment:
- - PREFER_HOST_MODE=hostname
- - MODE=standalone
- - NACOS_AUTH_ENABLE=false
- - JVM_XMS=512m
- - JVM_XMX=512m
- - JVM_XMN=256m
+ - PREFER_HOST_MODE=hostname
+ - MODE=standalone
+ - NACOS_AUTH_ENABLE=false
+ - SPRING_DATASOURCE_PLATFORM=mysql
+ - MYSQL_SERVICE_HOST=nacos-mysql
+ - MYSQL_SERVICE_DB_NAME=nacos_devtest
+ - MYSQL_SERVICE_PORT=3306
+ - MYSQL_SERVICE_USER=nacos
+ - MYSQL_SERVICE_PASSWORD=nacos
+ -
MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
+ - JVM_XMS=512m
+ - JVM_XMX=512m
+ - JVM_XMN=256m
+ expose:
+ - 8848
+ - 9848
+ - 9555
+ volumes:
+ -
${_basedir}/src/test/resources/nacos-logback-stdout.xml:/home/nacos/conf/nacos-logback.xml
+ depends_on:
+ - nacos-mysql
dubbo-samples-test-11137-test:
type: test
diff --git
a/99-integration/dubbo-samples-test-11137/src/test/resources/log4j2-test.xml
b/99-integration/dubbo-samples-test-11137/src/test/resources/log4j2-test.xml
deleted file mode 100644
index 41bc586a..00000000
--- a/99-integration/dubbo-samples-test-11137/src/test/resources/log4j2-test.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%d{HH:mm:ss.SSS} |-%highlight{%-5p} [%t]
%40.40c:%-3L -|
%m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect,org.junit)}"
charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git
a/99-integration/dubbo-samples-test-11137/src/test/resources/nacos-logback-stdout.xml
b/99-integration/dubbo-samples-test-11137/src/test/resources/nacos-logback-stdout.xml
new file mode 100644
index 00000000..bfdfc7e8
--- /dev/null
+++
b/99-integration/dubbo-samples-test-11137/src/test/resources/nacos-logback-stdout.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<configuration scan="true" scanPeriod="10 seconds">
+
+ <springProperty scope="context" name="logPath" source="nacos.logs.path"
defaultValue="${nacos.home}/logs"/>
+ <property name="LOG_HOME" value="${logPath}"/>
+
+ <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <Pattern>%date %level %msg%n%n</Pattern>
+ <charset>UTF-8</charset>
+ </encoder>
+ </appender>
+
+ <logger name="com.alibaba.nacos.core.remote" additivity="false">
+ <level value="DEBUG"/>
+ <appender-ref ref="CONSOLE"/>
+ </logger>
+ <logger name="com.alibaba.nacos.core.remote.push" additivity="false">
+ <level value="DEBUG"/>
+ <appender-ref ref="CONSOLE"/>
+ </logger>
+
+ <logger name="com.alibaba.nacos.core.remote.digest" additivity="false">
+ <level value="DEBUG"/>
+ <appender-ref ref="CONSOLE"/>
+ </logger>
+
+ <!-- TPS Control-->
+ <logger name="com.alibaba.nacos.core.remote.control.digest"
additivity="false">
+ <level value="DEBUG"/>
+ <appender-ref ref="CONSOLE"/>
+ </logger>
+
+ <logger name="com.alibaba.nacos.core.remote.control.detail"
additivity="false">
+ <level value="DEBUG"/>
+ <appender-ref ref="CONSOLE"/>
+ </logger>
+
+ <logger name="com.alibaba.nacos.core.remote.control" additivity="false">
+ <level value="DEBUG"/>
+ <appender-ref ref="CONSOLE"/>
+ </logger>
+
+ <logger name="com.alibaba.nacos.istio.main" additivity="false">
+ <level value="DEBUG"/>
+ <appender-ref ref="CONSOLE"/>
+ </logger>
+
+ <logger name="com.alibaba.nacos.core.auth" additivity="false">
+ <level value="DEBUG"/>
+ <appender-ref ref="CONSOLE"/>
+ </logger>
+
+ <logger name="org.apache.catalina.util.LifecycleBase">
+ <appender-ref ref="CONSOLE"/>
+ <level value="ERROR"/>
+ </logger>
+
+ <logger name="org.apache.coyote.http11.Http11NioProtocol">
+ <appender-ref ref="CONSOLE"/>
+ <level value="WARN"/>
+ </logger>
+
+ <logger name="org.apache.tomcat.util.net.NioSelectorPool">
+ <appender-ref ref="CONSOLE"/>
+ <level value="WARN"/>
+ </logger>
+
+ <root>
+ <level value="INFO"/>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+</configuration>
+