This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch SCB-2391
in repository https://gitbox.apache.org/repos/asf/servicecomb-pack.git

commit ad34577a74957f71006a1ef1fd45dead57cd85ce
Author: Willem Jiang <[email protected]>
AuthorDate: Fri Feb 25 12:02:43 2022 +0800

    SCB-2391 (WIP) Added more scenarios in TCC accept tests
---
 .../src/test/resources/pack_tcc_cancel_scenario.feature            | 2 ++
 ..._cancel_scenario.feature => pack_tcc_cancel_scenario_b.feature} | 7 +++----
 ..._cancel_scenario.feature => pack_tcc_cancel_scenario_c.feature} | 7 +++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git 
a/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
 
b/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
index cca3188..38c6e75 100644
--- 
a/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
+++ 
b/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
@@ -22,6 +22,8 @@ Feature: Alpha records transaction events
     And Alpha is up and running
 
     When User UserC requests to order 2 units of ProductA with unit price 2 
fail
+    # Call Inventory Service success
+    # Call Payment Serivce failed because of the balance reason
 
     Then Alpha records the following events
       | serviceName  | txType             |
diff --git 
a/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
 
b/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario_b.feature
similarity index 88%
copy from 
acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
copy to 
acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario_b.feature
index cca3188..3a77427 100644
--- 
a/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
+++ 
b/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario_b.feature
@@ -21,21 +21,20 @@ Feature: Alpha records transaction events
     And Ordering Service is up and running
     And Alpha is up and running
 
-    When User UserC requests to order 2 units of ProductA with unit price 2 
fail
+    When User UserC requests to order 4 units of ProductC with unit price 2 
fail
+    # Call Inventory Service failed
+    # Doesn't call the Payment service
 
     Then Alpha records the following events
       | serviceName  | txType             |
       | ordering     | STARTED            |
       | inventory    | P_TX_STATED        |
       | inventory    | P_TX_ENDED         |
-      | payment      | P_TX_STATED        |
-      | payment      | P_TX_ENDED         |
       | ordering     | ENDED              |
       | inventory    | COORDINATED        |
 
     Then Inventory Service contains the following booking orders
       | userName | productName | units | confirmed | cancelled |
-      | UserC    | ProductA    |  2    | false     |  true     |
 
     Then Payment Service contains the following booking orders
       | userName | amount | balance | confirmed | cancelled |
diff --git 
a/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
 
b/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario_c.feature
similarity index 85%
copy from 
acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
copy to 
acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario_c.feature
index cca3188..26bd801 100644
--- 
a/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario.feature
+++ 
b/acceptance-tests/acceptance-pack-tcc-spring-demo/src/test/resources/pack_tcc_cancel_scenario_c.feature
@@ -21,7 +21,10 @@ Feature: Alpha records transaction events
     And Ordering Service is up and running
     And Alpha is up and running
 
-    When User UserC requests to order 2 units of ProductA with unit price 2 
fail
+    When User UserD requests to order 2 units of ProductA with unit price 2 
fail
+    # Calling Inventory Service success
+    # Calling Payment Serivce failed because of the UserD doesn't exit
+    # Calling Payment prepare method failed
 
     Then Alpha records the following events
       | serviceName  | txType             |
@@ -35,7 +38,7 @@ Feature: Alpha records transaction events
 
     Then Inventory Service contains the following booking orders
       | userName | productName | units | confirmed | cancelled |
-      | UserC    | ProductA    |  2    | false     |  true     |
+      | UserD    | ProductA    |  2    | false     |  true     |
 
     Then Payment Service contains the following booking orders
       | userName | amount | balance | confirmed | cancelled |

Reply via email to