@@ -561,9 +561,8 @@ Feature: Network of Peers
561
561
| vp0 | vp1 | vp2 |
562
562
563
563
# Now start vp3 again
564
- Given I start peers:
564
+ Given I start peers, waiting up to "15" seconds for them to be ready :
565
565
| vp3 |
566
- And I wait "15" seconds
567
566
568
567
# Invoke 10 more txs, this will trigger a state transfer, set a target, and execute new outstanding transactions
569
568
When I invoke chaincode "example2" function name "invoke" on "vp0" "10" times
@@ -614,9 +613,8 @@ Feature: Network of Peers
614
613
Given I stop peers:
615
614
| vp0 | vp1 | vp2 | vp3 |
616
615
617
- Given I start peers:
616
+ Given I start peers, waiting up to "15" seconds for them to be ready :
618
617
| vp0 | vp1 | vp2 | vp3 |
619
- And I wait "15" seconds
620
618
621
619
When I query chaincode "example2" function name "query" with value "a" on peers:
622
620
| vp3 |
@@ -868,9 +866,8 @@ Feature: Network of Peers
868
866
| vp1 | vp2 | vp3 |
869
867
870
868
# Now start vp1, vp2 again, hopefully retaining pbft state
871
- Given I start peers:
869
+ Given I start peers, waiting up to "15" seconds for them to be ready :
872
870
| vp1 | vp2 |
873
- And I wait "15" seconds
874
871
875
872
# Invoke 1 more tx, if the crash recovery worked, it will commit, otherwise, it will not
876
873
When I invoke chaincode "example2" function name "invoke" on "vp0"
@@ -934,7 +931,7 @@ Feature: Network of Peers
934
931
| vp0 | vp1 | vp2 |
935
932
936
933
# Now start vp3 again
937
- Given I start peers:
934
+ Given I start peers, waiting up to "15" seconds for them to be ready :
938
935
| vp3 |
939
936
940
937
# Invoke some more txs, this will trigger a state transfer, but it cannot complete
@@ -1064,9 +1061,8 @@ Feature: Network of Peers
1064
1061
When requesting "/network/peers" from "vp1"
1065
1062
Then I should get a JSON response with array "peers" contains "1" elements
1066
1063
1067
- Given I start peers:
1064
+ Given I start peers, waiting up to "15" seconds for them to be ready :
1068
1065
| vp0 |
1069
- And I wait "10" seconds
1070
1066
1071
1067
When requesting "/network/peers" from "vp1"
1072
1068
Then I should get a JSON response with array "peers" contains "2" elements
@@ -1120,10 +1116,9 @@ Scenario: chaincode example02 with 4 peers, stop and start alternates, reverse
1120
1116
Then I should get a JSON response from peers with "result.message" = "997"
1121
1117
| vp0 | vp1 | vp3 |
1122
1118
1123
- Given I start peers:
1119
+ Given I start peers, waiting up to "15" seconds for them to be ready :
1124
1120
| vp2 |
1125
1121
1126
- And I wait "15" seconds
1127
1122
Given I stop peers:
1128
1123
| vp1 |
1129
1124
When I invoke chaincode "example2" function name "invoke" on "vp3" "20" times
@@ -1173,7 +1168,7 @@ Scenario: chaincode example02 with 4 peers, two stopped
1173
1168
| a | b | 10 |
1174
1169
Then I should have received a transactionID
1175
1170
1176
- Given I start peers:
1171
+ Given I start peers, waiting up to "15" seconds for them to be ready :
1177
1172
| vp3 |
1178
1173
1179
1174
# Make sure vp3 catches up first
@@ -1197,7 +1192,6 @@ Scenario: chaincode example02 with 4 peers, two stopped
1197
1192
| vp0 | vp1 | vp3 |
1198
1193
1199
1194
@issue_1874b
1200
- #@doNotDecompose
1201
1195
Scenario : chaincode example02 with 4 peers, two stopped, bring back vp0
1202
1196
Given we compose "docker-compose-4-consensus-batch.yml"
1203
1197
And I register with CA supplying username "binhn" and secret "7avZQLwcUe9q" on peers:
@@ -1243,15 +1237,18 @@ Scenario: chaincode example02 with 4 peers, two stopped, bring back vp0
1243
1237
| a | b | 10 |
1244
1238
Then I should have received a transactionID
1245
1239
1246
- Given I start peers:
1240
+ Given I start peers, waiting up to "15" seconds for them to be ready :
1247
1241
| vp0 |
1248
- And I wait "15" seconds
1242
+
1243
+ # Ensure transaction committed while vp0 was down is part of the ledger
1244
+ Then I wait up to "60" seconds for transaction to be committed to peers:
1245
+ | vp0 | vp1 | vp2 |
1249
1246
1250
1247
When I invoke chaincode "example2" function name "invoke" on "vp1" "8" times
1251
1248
|arg1 |arg2 |arg3 |
1252
1249
| a | b | 10 |
1253
1250
Then I should have received a transactionID
1254
- Then I wait up to "60" seconds for transaction to be committed to peers:
1251
+ Then I wait up to "60" seconds for transactions to be committed to peers:
1255
1252
| vp0 | vp1 | vp2 |
1256
1253
1257
1254
When I query chaincode "example2" function name "query" with value "a" on peers:
@@ -1294,9 +1291,8 @@ Scenario: chaincode example02 with 4 peers, two stopped, bring back both
1294
1291
| a | b | 10 |
1295
1292
Then I should have received a transactionID
1296
1293
1297
- Given I start peers:
1294
+ Given I start peers, waiting up to "15" seconds for them to be ready :
1298
1295
| vp1 | vp2 |
1299
- And I wait "15" seconds
1300
1296
1301
1297
When I invoke chaincode "example2" function name "invoke" on "vp0" "8" times
1302
1298
|arg1 |arg2 |arg3 |
0 commit comments