You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/01/04 11:36:51 UTC

[GitHub] [dubbo-samples] shengchaojie opened a new pull request #218: complete dubbo-samples-transaction integration test case

shengchaojie opened a new pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] shengchaojie commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
shengchaojie commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551284772



##########
File path: dubbo-samples-transaction/src/main/resources/file.conf
##########
@@ -0,0 +1,57 @@
+transport {

Review comment:
       是的 最新版的seata 需要在自己本地指定  不然跑不起来




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] shengchaojie commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
shengchaojie commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551690678



##########
File path: dubbo-samples-transaction/src/test/java/org/apache/dubbo/samples/service/BusinessIT.java
##########
@@ -52,6 +53,14 @@ public void testRollback() throws Exception {
 
     @Test
     public void testCommit() throws Exception {
-        // TODO: need implement a success commit
+        System.setProperty("testcase.rollback","true");

Review comment:
       > 这个commit案例也是抛出异常?也是回滚?哪里commit了?
   > 另外建议将`testcase.rollback`改一个名字,`rollback`好像不是很好
   
   额 写错了 我改下 这边应该是false




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] shengchaojie commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
shengchaojie commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551751667



##########
File path: dubbo-samples-transaction/src/main/resources/docker/docker-compose.yml
##########
@@ -1,13 +1,22 @@
 version: '3.3'
 services:
   seata-mysql:
-    build: mysql
+    image: mysql:5.7
+    volumes:
+      - ./mysql/sql:/docker-entrypoint-initdb.d
+    environment:
+      - MYSQL_DATABASE=seata-demo
+      - MYSQL_ROOT_PASSWORD=helloworld
     ports:

Review comment:
       这个compose 是用户自己跑demo的compose文件,映射下没事吧,让用户自己来填端口




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] shengchaojie commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
shengchaojie commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551375200



##########
File path: dubbo-samples-transaction/src/test/java/org/apache/dubbo/samples/service/BusinessIT.java
##########
@@ -52,6 +53,14 @@ public void testRollback() throws Exception {
 
     @Test
     public void testCommit() throws Exception {
-        // TODO: need implement a success commit
+        System.setProperty("testcase.rollback","true");

Review comment:
       这个是测试正常提交的场景 rollback是测试有一个异常了 回滚的场景




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] chickenlj merged pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
chickenlj merged pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551269424



##########
File path: dubbo-samples-transaction/pom.xml
##########
@@ -32,7 +32,7 @@
         <source.level>1.8</source.level>
         <target.level>1.8</target.level>
         <dubbo.version>2.7.7</dubbo.version>
-        <seata.version>0.5.0</seata.version>
+        <seata.version>1.4.0</seata.version>
         <mysql-connector.version>8.0.15</mysql-connector.version>

Review comment:
       mysql-connector.version  这种不需要抽取属性,docker-maven-plugin.version等无用的属性删除掉

##########
File path: dubbo-samples-transaction/src/main/resources/file.conf
##########
@@ -0,0 +1,57 @@
+transport {

Review comment:
       resources/file.conf 和 resources/registry.conf 是给seata client使用的?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] shengchaojie commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
shengchaojie commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551274518



##########
File path: dubbo-samples-transaction/src/main/resources/file.conf
##########
@@ -0,0 +1,57 @@
+transport {

Review comment:
       好的 我改下




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551750429



##########
File path: dubbo-samples-transaction/src/main/resources/docker/docker-compose.yml
##########
@@ -1,13 +1,22 @@
 version: '3.3'
 services:
   seata-mysql:
-    build: mysql
+    image: mysql:5.7
+    volumes:
+      - ./mysql/sql:/docker-entrypoint-initdb.d
+    environment:
+      - MYSQL_DATABASE=seata-demo
+      - MYSQL_ROOT_PASSWORD=helloworld
     ports:

Review comment:
       不要映射端口到宿主机




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551682971



##########
File path: dubbo-samples-transaction/src/test/java/org/apache/dubbo/samples/service/BusinessIT.java
##########
@@ -52,6 +53,14 @@ public void testRollback() throws Exception {
 
     @Test
     public void testCommit() throws Exception {
-        // TODO: need implement a success commit
+        System.setProperty("testcase.rollback","true");

Review comment:
       这个commit案例也是抛出异常?也是回滚?哪里commit了?
   另外建议将`testcase.rollback`改一个名字,`rollback`好像不是很好




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] shengchaojie commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
shengchaojie commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551274518



##########
File path: dubbo-samples-transaction/src/main/resources/file.conf
##########
@@ -0,0 +1,57 @@
+transport {

Review comment:
       好的 我改下




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] shengchaojie commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
shengchaojie commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551285209



##########
File path: dubbo-samples-transaction/src/main/resources/file.conf
##########
@@ -0,0 +1,57 @@
+transport {

Review comment:
       老版本他自己的jar里有一份 所以不用指定  file.conf 里 我用了config框架的重载特性 实现了读取环境变量的配置 从而实现通过docker-compose文件中的配置修改seata server的host




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551750429



##########
File path: dubbo-samples-transaction/src/main/resources/docker/docker-compose.yml
##########
@@ -1,13 +1,22 @@
 version: '3.3'
 services:
   seata-mysql:
-    build: mysql
+    image: mysql:5.7
+    volumes:
+      - ./mysql/sql:/docker-entrypoint-initdb.d
+    environment:
+      - MYSQL_DATABASE=seata-demo
+      - MYSQL_ROOT_PASSWORD=helloworld
     ports:

Review comment:
       不要映射端口到宿主机,删除所有ports




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551752879



##########
File path: dubbo-samples-transaction/src/main/resources/docker/docker-compose.yml
##########
@@ -1,13 +1,22 @@
 version: '3.3'
 services:
   seata-mysql:
-    build: mysql
+    image: mysql:5.7
+    volumes:
+      - ./mysql/sql:/docker-entrypoint-initdb.d
+    environment:
+      - MYSQL_DATABASE=seata-demo
+      - MYSQL_ROOT_PASSWORD=helloworld
     ports:

Review comment:
       噢噢,不是集成测试的没关系




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] shengchaojie commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
shengchaojie commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551375630



##########
File path: dubbo-samples-transaction/src/test/java/org/apache/dubbo/samples/service/BusinessIT.java
##########
@@ -52,6 +53,14 @@ public void testRollback() throws Exception {
 
     @Test
     public void testCommit() throws Exception {
-        // TODO: need implement a success commit
+        System.setProperty("testcase.rollback","true");

Review comment:
       我加了一个标志位 用来控制 分支事务 是否抛出异常




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] kylixs commented on a change in pull request #218: complete dubbo-samples-transaction integration test case

Posted by GitBox <gi...@apache.org>.
kylixs commented on a change in pull request #218:
URL: https://github.com/apache/dubbo-samples/pull/218#discussion_r551290174



##########
File path: dubbo-samples-transaction/src/test/java/org/apache/dubbo/samples/service/BusinessIT.java
##########
@@ -52,6 +53,14 @@ public void testRollback() throws Exception {
 
     @Test
     public void testCommit() throws Exception {
-        // TODO: need implement a success commit
+        System.setProperty("testcase.rollback","true");

Review comment:
       这个案例可以解析一下吗? 看起来与testRollback() 没有多大区别?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org