kylixs commented on a change in pull request #266:
URL: https://github.com/apache/dubbo-samples/pull/266#discussion_r558928605
##########
File path:
dubbo-samples-edas/dubbo-samples-edas-provider/src/test/java/org/apache/dubbo/samples/edas/EDASIT.java
##########
@@ -21,14 +21,11 @@
import org.apache.dubbo.samples.edas.provider.DubboProvider;
import org.junit.Assert;
-import org.junit.ClassRule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
-import org.testcontainers.containers.FixedHostPortGenericContainer;
-import org.testcontainers.containers.GenericContainer;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {DubboProvider.class, DubboConsumer.class})
Review comment:
Test类不需要加载DubboProvider.class
##########
File path: dubbo-samples-edas/case-configuration.yml
##########
@@ -0,0 +1,48 @@
+# 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.
+
+
+services:
+ dubbo-samples-edas-provider:
+ type: app
+ basedir: dubbo-samples-edas-provider
+ mainClass: org.apache.dubbo.samples.edas.provider.DubboProvider
+ systemProps:
+ - edas.address=127.0.0.1
+ waitPortsBeforeRun:
+ depends_on:
Review comment:
需要添加checkPorts/checkLog
##########
File path:
dubbo-samples-edas/dubbo-samples-edas-provider/src/test/java/org/apache/dubbo/samples/edas/EDASIT.java
##########
@@ -21,14 +21,11 @@
import org.apache.dubbo.samples.edas.provider.DubboProvider;
import org.junit.Assert;
-import org.junit.ClassRule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
-import org.testcontainers.containers.FixedHostPortGenericContainer;
-import org.testcontainers.containers.GenericContainer;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {DubboProvider.class, DubboConsumer.class})
Review comment:
EDASIT 测试案例存在问题,没有成功调用provider。我觉得需要启动一个edas轻量配置中心,可以参考这个文档:
https://developer.aliyun.com/article/569912
。还需要将edas轻量配置中心做出一个docker镜像,以便在容器中跑起来。
##########
File path: dubbo-samples-edas/case-configuration.yml
##########
@@ -0,0 +1,48 @@
+# 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.
+
+
+services:
+ dubbo-samples-edas-provider:
+ type: app
+ basedir: dubbo-samples-edas-provider
+ mainClass: org.apache.dubbo.samples.edas.provider.DubboProvider
+ systemProps:
+ - edas.address=127.0.0.1
+ waitPortsBeforeRun:
+ depends_on:
+
+ dubbo-samples-edas-consumer:
+ type: app
+ basedir: dubbo-samples-edas-consumer
+ mainClass: org.apache.dubbo.samples.edas.consumer.DubboConsumer
Review comment:
好像不需要运行consumer
`org.apache.dubbo.samples.edas.consumer.DubboConsumer`,dubbo-samples-edas-consumer
应该是调用示例
##########
File path: dubbo-samples-edas/pom.xml
##########
@@ -13,6 +13,9 @@
<artifactId>dubbo-samples-edas</artifactId>
<properties>
+ <spring-boot.version>1.5.13.RELEASE</spring-boot.version>
+ <dubbo.version>2.7.7</dubbo.version>
+ <junit.version>4.12</junit.version>
<source.level>1.8</source.level>
<target.level>1.8</target.level>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
Review comment:
maven-compiler-plugin.version 这个属性不需要抽取
##########
File path: dubbo-samples-edas/case-configuration.yml
##########
@@ -0,0 +1,48 @@
+# 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.
+
+
+services:
+ dubbo-samples-edas-provider:
+ type: app
+ basedir: dubbo-samples-edas-provider
+ mainClass: org.apache.dubbo.samples.edas.provider.DubboProvider
+ systemProps:
+ - edas.address=127.0.0.1
+ waitPortsBeforeRun:
+ depends_on:
+
+ dubbo-samples-edas-consumer:
+ type: app
+ basedir: dubbo-samples-edas-consumer
+ mainClass: org.apache.dubbo.samples.edas.consumer.DubboConsumer
+ systemProps:
+ - edas.address=127.0.0.1
+ waitPortsBeforeRun:
+ depends_on:
+ - dubbo-samples-edas-provider
+
+ dubbo-samples-edas-test:
+ type: test
+ basedir: dubbo-samples-edas-provider
+ tests:
+ - "**/*IT.class"
+ systemProps:
+ waitPortsBeforeRun:
+ - dubbo-samples-edas-consumer:8088
+ depends_on:
+ - dubbo-samples-edas-provider
+ - dubbo-samples-edas-consumer
Review comment:
dubbo-samples-edas-test 不需要
依赖dubbo-samples-edas-consumer,没有访问dubbo-samples-edas-consumer:8088吧?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]