Skip to content

Commit

Permalink
feat: test spring-seata-dubbo-saga e2e case
Browse files Browse the repository at this point in the history
  • Loading branch information
xjlgod committed Oct 26, 2024
1 parent 588af9e commit 3bb4108
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions saga-sample/spring-seata-dubbo-saga/seata-e2e1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ e2e:
condition: service_started
environment:
seata.address: seata
zookeeper.address: zookeeper
zookeeper.address: zookeeperAddress
E2E_ENV: open
# provider service
providers:
Expand All @@ -38,7 +38,7 @@ e2e:
condition: service_healthy
environment:
seata.address: seata
zookeeper.address: zookeeper
zookeeper.address: zookeeperAddress
E2E_ENV: open
# infrastructure services
infrastructures:
Expand All @@ -54,7 +54,7 @@ e2e:
STORE_MODE: file
- name: zookeeper
docker_service:
hostname: zookeeper
hostname: zookeeperAddress
image: zookeeper:3.8.4
# ports:
# - "2181:2181"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public static void main(String[] args) throws InterruptedException {

AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(SagaTransactionStarter.class);

// StateMachineEngine stateMachineEngine = (StateMachineEngine) applicationContext.getBean("stateMachineEngine");
//
// transactionCommittedDemo(stateMachineEngine);
//
// transactionCompensatedDemo(stateMachineEngine);
StateMachineEngine stateMachineEngine = (StateMachineEngine) applicationContext.getBean("stateMachineEngine");

transactionCommittedDemo(stateMachineEngine);

transactionCompensatedDemo(stateMachineEngine);
if (isInE2ETest()) {
String res = "{\"res\": \"commit\"}";
writeE2EResFile(res, "commit.yaml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public ApplicationConfig applicationConfig() {
public RegistryConfig registryConfig() {
RegistryConfig registryConfig = new RegistryConfig();
if (isInE2ETest()) {
registryConfig.setAddress("zookeeper://zookeeper:2181");
registryConfig.setAddress("zookeeper://zookeeperAddress:2181");
} else {
registryConfig.setAddress("zookeeper://localhost:2181");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ApplicationConfig applicationConfig() {
public RegistryConfig registryConfig() {
RegistryConfig registryConfig = new RegistryConfig();
if (isInE2ETest()) {
registryConfig.setAddress("zookeeper://zookeeper:2181");
registryConfig.setAddress("zookeeper://zookeeperAddress:2181");
} else {
registryConfig.setAddress("zookeeper://localhost:2181");
}
Expand Down

0 comments on commit 3bb4108

Please sign in to comment.