Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions e2e-network/docker/test-04-v3-snapshot-ccaas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,15 @@ echo "$user_token_response"
user_token="$(echo "$user_token_response" | jq -r '.token')"

# check if state is kept after restoration
expectInvokeRest "$fablo_rest_org1 $user_token" "my-channel1" "chaincode1" \
"KVContract:get" '["name"]' \
'{"response":{"success":"Mr Freeze"}}'
sleep 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we get a predictable behavior with shorter sleep? like 2 seconds for instance?

for i in {1..10}; do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is now passing consistently, so a retry loop is no longer required

echo "Checking restored data, attempt #$i"
expectInvokeRest "$fablo_rest_org1 $user_token" "my-channel1" "chaincode1" \
"KVContract:get" '["name"]' \
'{"response":{"success":"Mr Freeze"}}' && break
sleep 5
done

expectInvokeRest "$fablo_rest_org1 $user_token" "my-channel1" "chaincode1" \
"KVContract:getPrivateMessage" '["_implicit_org_Org1MSP"]' \
'{"success":"RHIgVmljdG9yIEZyaWVz"}'
Expand Down
Loading