Skip to content

Commit

Permalink
Add new seata samples (#1041)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingfudeshi authored Mar 6, 2024
1 parent b67f6a8 commit 1f8c4ef
Show file tree
Hide file tree
Showing 67 changed files with 1,313 additions and 2,720 deletions.
104 changes: 22 additions & 82 deletions 2-advanced/dubbo-samples-seata/case-configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,136 +20,76 @@ timeout: 300
systemProps:
- mysql.address=seata-mysql
- mysql.port=3306
- seata.address=seata-server
- seata.port=8091

services:
nacos:
image: nacos/nacos-server:2.0.0
environment:
- PREFER_HOST_MODE=hostname
- MODE=standalone
- NACOS_AUTH_ENABLE=true
- JVM_XMS=512m
- JVM_XMX=512m
- JVM_XMN=256m

seata-mysql:
image: mysql:5.7
environment:
- MYSQL_DATABASE=seata-demo
- MYSQL_DATABASE=seata
- MYSQL_ROOT_PASSWORD=helloworld
expose:
- 3306
volumes:
- ${_basedir}/deploy/docker-compose/mysql/sql:/docker-entrypoint-initdb.d
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

- ${_basedir}/script/db:/docker-entrypoint-initdb.d
seata-server:
#build: ${_basedir}/src/main/resources/docker/seata
#removeOnExit: true
image: seataio/seata-server:latest
environment:
- SEATA_PORT=8091
- STORE_MODE=file
expose:
- 8091
depends_on:
- seata-mysql

storage-service:
account-service:
type: app
basedir: dubbo-samples-seata-storage
mainClass: org.apache.dubbo.samples.seata.StorageApplication
systemProps:
- nacos.address=nacos
- nacos.port=8848
- seata.address=seata-server
jvmFlags:
- "--add-opens java.base/java.lang.reflect=ALL-UNNAMED"
basedir: dubbo-samples-seata-account
mainClass: org.apache.dubbo.samples.seata.account.AccountApplication
waitPortsBeforeRun:
- nacos:8848
- seata-mysql:3306
- seata-server:8091
checkLog: "Current Spring Boot Application is await"
checkLog: "Current Spring Boot Application (Account) is await"
checkPorts:
- 20884
- 20881
depends_on:
- seata-mysql
- seata-server
- nacos

account-service:
order-service:
type: app
basedir: dubbo-samples-seata-account
mainClass: org.apache.dubbo.samples.seata.AccountApplication
systemProps:
- nacos.address=nacos
- nacos.port=8848
- seata.address=seata-server
jvmFlags:
- "--add-opens java.base/java.lang.reflect=ALL-UNNAMED"
basedir: dubbo-samples-seata-order
mainClass: org.apache.dubbo.samples.seata.order.OrderApplication
waitPortsBeforeRun:
- nacos:8848
- seata-mysql:3306
- seata-server:8091
checkLog: "Current Spring Boot Application is await"
- account-service:20881
checkLog: "Current Spring Boot Application (Order) is await"
checkPorts:
- 20881
- 20883
depends_on:
- nacos
- seata-mysql
- seata-server

order-service:
stock-service:
type: app
basedir: dubbo-samples-seata-order
mainClass: org.apache.dubbo.samples.seata.OrderApplication
systemProps:
- nacos.address=nacos
- nacos.port=8848
- seata.address=seata-server
jvmFlags:
- "--add-opens java.base/java.lang.reflect=ALL-UNNAMED"
basedir: dubbo-samples-seata-stock
mainClass: org.apache.dubbo.samples.seata.stock.StockApplication
waitPortsBeforeRun:
- nacos:8848
- seata-mysql:3306
- seata-server:8091
checkLog: "Current Spring Boot Application is await"
- order-service:20883
checkLog: "Current Spring Boot Application (Stock) is await"
checkPorts:
- 20883
- 20884
depends_on:
- nacos
- seata-mysql
- seata-server
- account-service

business-test:
type: test
basedir: dubbo-samples-seata-business
tests:
- "**/*IT.class"
systemProps:
- nacos.address=nacos
- nacos.port=8848
- seata.address=seata-server
jvmFlags:
- "--add-opens java.base/java.lang.reflect=ALL-UNNAMED"
waitPortsBeforeRun:
- nacos:8848
- seata-mysql:3306
- seata-server:8091
- storage-service:20884
- account-service:20881
- order-service:20883
- stock-service:20884
depends_on:
- nacos
- seata-mysql
- seata-server
- order-service
- account-service
- storage-service

19 changes: 0 additions & 19 deletions 2-advanced/dubbo-samples-seata/case-version-sources.conf

This file was deleted.

8 changes: 4 additions & 4 deletions 2-advanced/dubbo-samples-seata/case-versions.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# Supported component versions of the test case

# Spring app
dubbo.version= [ >= 3.2.0 ]
java.version= [ >= 17 ]
seata.version=[ >= 1.6.1, "!1.7.0-native-rc2" ]
# SpringBoot app
dubbo.version=2.7*, 3.*
spring-boot.version=2.*
java.version= [ >= 8 ]
Loading

0 comments on commit 1f8c4ef

Please sign in to comment.