You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2019/08/05 14:47:17 UTC

[servicecomb-pack] 06/38: SCB-1369 Merge cucumber feature

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

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

commit 19d7bb5f4874f6f2e9f1c37d48bf466c9e285125
Author: Lei Zhang <co...@gmail.com>
AuthorDate: Fri Jul 26 14:44:37 2019 +0800

    SCB-1369 Merge cucumber feature
---
 .../alpha_records_transaction_events.feature       | 169 +++++++++++++++++++++
 ...ion_after_post_car_compensated_scenario.feature |  42 -----
 ...n_after_post_hotel_compensated_scenario.feature |  46 ------
 ...pack_booking_timeout_suspended_scenario.feature |  44 ------
 .../pack_car_fail_compensated_scenario.feature     |  37 -----
 .../pack_hotel_fail_compensated_scenario.feature   |  41 -----
 .../test/resources/pack_success_scenario.feature   |  41 -----
 7 files changed, 169 insertions(+), 251 deletions(-)

diff --git a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/alpha_records_transaction_events.feature b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/alpha_records_transaction_events.feature
new file mode 100644
index 0000000..52b4d5b
--- /dev/null
+++ b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/alpha_records_transaction_events.feature
@@ -0,0 +1,169 @@
+# 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.
+
+Feature: Alpha records transaction events
+
+  Scenario: 1.Success Scenario
+    Given Car Service is up and running
+    And Hotel Service is up and running
+    And Booking Service is up and running
+    And Alpha is up and running
+
+    When User Sean requests to book 2 cars and 1 rooms success
+
+    Then Alpha records the following events
+      | serviceName  | type             |
+      | booking | SagaStartedEvent |
+      | car     | TxStartedEvent   |
+      | car     | TxEndedEvent     |
+      | hotel   | TxStartedEvent   |
+      | hotel   | TxEndedEvent     |
+      | booking | SagaEndedEvent   |
+
+    And Car Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+      | 1  | Sean | 2      | true      | false     |
+
+    And Hotel Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+      | 1  | Sean | 1      | true      | false     |
+
+
+  Scenario: 2.Booking Exception After Car Hotel Secenario
+    Given Car Service is up and running
+    And Hotel Service is up and running
+    And Booking Service is up and running
+    And Alpha is up and running
+
+    Given Install the byteman script booking_exception_after_post_car.btm to Booking Service
+
+    When User Sean requests to book 1 cars and 1 rooms fail
+
+    Then Alpha records the following events
+      | serviceName  | type               |
+      | booking | SagaStartedEvent   |
+      | car     | TxStartedEvent     |
+      | car     | TxEndedEvent       |
+      | booking | SagaAbortedEvent     |
+      | car     | TxCompensatedEvent |
+
+    Then Car Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+      | 1  | Sean | 1      | false     | true      |
+
+    Then Hotel Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+
+  Scenario: 2.Booking Exception After Post Hotel Secenario
+    Given Car Service is up and running
+    And Hotel Service is up and running
+    And Booking Service is up and running
+    And Alpha is up and running
+
+    Given Install the byteman script booking_exception_after_post_hotel.btm to Booking Service
+
+    When User Sean requests to book 1 cars and 1 rooms fail
+
+    Then Alpha records the following events
+      | serviceName  | type               |
+      | booking | SagaStartedEvent   |
+      | car     | TxStartedEvent     |
+      | car     | TxEndedEvent       |
+      | hotel     | TxStartedEvent     |
+      | hotel     | TxEndedEvent       |
+      | booking | SagaAbortedEvent     |
+      | hotel     | TxCompensatedEvent |
+      | car     | TxCompensatedEvent |
+
+    Then Car Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+      | 1  | Sean | 1      | false     | true      |
+
+    Then Hotel Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+      | 1  | Sean | 1      | false     | true      |
+
+  Scenario: 4.Booking transaction timeout and will be suspended
+    Given Car Service is up and running
+    And Hotel Service is up and running
+    And Booking Service is up and running
+    And Alpha is up and running
+
+    Given Install the byteman script booking_timeout.btm to Booking Service
+
+    When User Sean requests to book 1 cars and 1 rooms fail
+
+    Then Alpha records the following events
+      | serviceName  | type          |
+      | booking | SagaStartedEvent   |
+      | car     | TxStartedEvent     |
+      | car     | TxEndedEvent       |
+      | hotel   | TxStartedEvent     |
+      | hotel   | TxEndedEvent       |
+
+
+    Then Car Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+      | 1  | Sean | 1      | true     | false      |
+
+    Then Hotel Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+      | 1  | Sean | 1      | true     | false      |
+
+  Scenario: 5.Car sub-transaction failed and global transaction compensated
+    Given Car Service is up and running
+    And Hotel Service is up and running
+    And Booking Service is up and running
+    And Alpha is up and running
+
+    When User Sean requests to book 11 cars and 1 rooms fail
+
+    Then Alpha records the following events
+      | serviceName  | type          |
+      | booking | SagaStartedEvent   |
+      | car     | TxStartedEvent     |
+      | car     | TxAbortedEvent     |
+      | booking | SagaAbortedEvent   |
+
+    Then Car Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+
+    Then Hotel Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+
+  Scenario: 6.Hotel sub-transaction failed and global transaction compensated
+    Given Car Service is up and running
+    And Hotel Service is up and running
+    And Booking Service is up and running
+    And Alpha is up and running
+
+    When User Sean requests to book 5 cars and 3 rooms fail
+
+    Then Alpha records the following events
+      | serviceName  | type               |
+      | booking | SagaStartedEvent   |
+      | car     | TxStartedEvent     |
+      | car     | TxEndedEvent       |
+      | hotel   | TxStartedEvent     |
+      | hotel   | TxAbortedEvent     |
+      | booking | SagaAbortedEvent     |
+      | car     | TxCompensatedEvent |
+
+    Then Car Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
+      | 1  | Sean | 5      | false     | true      |
+
+    Then Hotel Service contains the following booking orders
+      | id | name | amount | confirmed | cancelled |
\ No newline at end of file
diff --git a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_booking_exception_after_post_car_compensated_scenario.feature b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_booking_exception_after_post_car_compensated_scenario.feature
deleted file mode 100644
index dd441dd..0000000
--- a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_booking_exception_after_post_car_compensated_scenario.feature
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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.
-
-Feature: Alpha records transaction events
-
-  Scenario: Booking Exception After Car Hotel Secenario
-    Given Car Service is up and running
-    And Hotel Service is up and running
-    And Booking Service is up and running
-    And Alpha is up and running
-
-    Given Install the byteman script booking_exception_after_post_car.btm to Booking Service
-
-    When User Sean requests to book 1 cars and 1 rooms fail
-
-    Then Alpha records the following events
-      | serviceName  | type               |
-      | booking | SagaStartedEvent   |
-      | car     | TxStartedEvent     |
-      | car     | TxEndedEvent       |
-      | booking | SagaAbortedEvent     |
-      | car     | TxCompensatedEvent |
-
-    Then Car Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-      | 1  | Sean | 1      | false     | true      |
-
-    Then Hotel Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-    
diff --git a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_booking_exception_after_post_hotel_compensated_scenario.feature b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_booking_exception_after_post_hotel_compensated_scenario.feature
deleted file mode 100644
index 15aa8eb..0000000
--- a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_booking_exception_after_post_hotel_compensated_scenario.feature
+++ /dev/null
@@ -1,46 +0,0 @@
-# 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.
-
-Feature: Alpha records transaction events
-
-  Scenario: Booking Exception After Post Hotel Secenario
-    Given Car Service is up and running
-    And Hotel Service is up and running
-    And Booking Service is up and running
-    And Alpha is up and running
-
-    Given Install the byteman script booking_exception_after_post_hotel.btm to Booking Service
-
-    When User Sean requests to book 1 cars and 1 rooms fail
-
-    Then Alpha records the following events
-      | serviceName  | type               |
-      | booking | SagaStartedEvent   |
-      | car     | TxStartedEvent     |
-      | car     | TxEndedEvent       |
-      | hotel     | TxStartedEvent     |
-      | hotel     | TxEndedEvent       |
-      | booking | SagaAbortedEvent     |
-      | hotel     | TxCompensatedEvent |
-      | car     | TxCompensatedEvent |
-
-    Then Car Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-      | 1  | Sean | 1      | false     | true      |
-
-    Then Hotel Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-      | 1  | Sean | 1      | false     | true      |
-    
diff --git a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_booking_timeout_suspended_scenario.feature b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_booking_timeout_suspended_scenario.feature
deleted file mode 100644
index 8b4a707..0000000
--- a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_booking_timeout_suspended_scenario.feature
+++ /dev/null
@@ -1,44 +0,0 @@
-# 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.
-
-Feature: Alpha records transaction events
-
-  Scenario: Booking transaction timeout and will be suspended
-    Given Car Service is up and running
-    And Hotel Service is up and running
-    And Booking Service is up and running
-    And Alpha is up and running
-
-    Given Install the byteman script booking_timeout.btm to Booking Service
-
-    When User Sean requests to book 1 cars and 1 rooms fail
-
-    Then Alpha records the following events
-      | serviceName  | type          |
-      | booking | SagaStartedEvent   |
-      | car     | TxStartedEvent     |
-      | car     | TxEndedEvent       |
-      | hotel   | TxStartedEvent     |
-      | hotel   | TxEndedEvent       |
-
-
-    Then Car Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-      | 1  | Sean | 1      | true     | false      |
-
-    Then Hotel Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-      | 1  | Sean | 1      | true     | false      |
-
diff --git a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_car_fail_compensated_scenario.feature b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_car_fail_compensated_scenario.feature
deleted file mode 100644
index 3abf2d0..0000000
--- a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_car_fail_compensated_scenario.feature
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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.
-
-Feature: Alpha records transaction events
-
-  Scenario: Car sub-transaction failed and global transaction compensated
-    Given Car Service is up and running
-    And Hotel Service is up and running
-    And Booking Service is up and running
-    And Alpha is up and running
-
-    When User Sean requests to book 11 cars and 1 rooms fail
-
-    Then Alpha records the following events
-      | serviceName  | type          |
-      | booking | SagaStartedEvent   |
-      | car     | TxStartedEvent     |
-      | car     | TxAbortedEvent     |
-      | booking | SagaAbortedEvent   |
-    
-    Then Car Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-
-    Then Hotel Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
diff --git a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_hotel_fail_compensated_scenario.feature b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_hotel_fail_compensated_scenario.feature
deleted file mode 100644
index 0e11ae9..0000000
--- a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_hotel_fail_compensated_scenario.feature
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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.
-
-Feature: Alpha records transaction events
-
-  Scenario: Hotel sub-transaction failed and global transaction compensated
-    Given Car Service is up and running
-    And Hotel Service is up and running
-    And Booking Service is up and running
-    And Alpha is up and running
-
-    When User Sean requests to book 5 cars and 3 rooms fail
-
-    Then Alpha records the following events
-      | serviceName  | type               |
-      | booking | SagaStartedEvent   |
-      | car     | TxStartedEvent     |
-      | car     | TxEndedEvent       |
-      | hotel   | TxStartedEvent     |
-      | hotel   | TxAbortedEvent     |
-      | booking | SagaAbortedEvent     |
-      | car     | TxCompensatedEvent |
-    
-    Then Car Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-      | 1  | Sean | 5      | false     | true      |
-
-    Then Hotel Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
diff --git a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_success_scenario.feature b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_success_scenario.feature
deleted file mode 100644
index 4157753..0000000
--- a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/pack_success_scenario.feature
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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.
-
-Feature: Alpha records transaction events
-
-  Scenario: Success Scenario
-    Given Car Service is up and running
-    And Hotel Service is up and running
-    And Booking Service is up and running
-    And Alpha is up and running
-
-    When User Sean requests to book 2 cars and 1 rooms success
-
-    Then Alpha records the following events
-      | serviceName  | type             |
-      | booking | SagaStartedEvent |
-      | car     | TxStartedEvent   |
-      | car     | TxEndedEvent     |
-      | hotel   | TxStartedEvent   |
-      | hotel   | TxEndedEvent     |
-      | booking | SagaEndedEvent   |
-
-    And Car Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-      | 1  | Sean | 2      | true      | false     |
-
-    And Hotel Service contains the following booking orders
-      | id | name | amount | confirmed | cancelled |
-      | 1  | Sean | 1      | true      | false     |