Skip to content

Commit

Permalink
fix test-service
Browse files Browse the repository at this point in the history
  • Loading branch information
siburu committed Aug 20, 2024
1 parent e9c6cc3 commit aa74f8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 6 additions & 6 deletions tests/cases/tm2tm/scripts/test-service
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ RLY_PID=$!
echo "xxxxxxx ${SECONDS} relay service [packets = 0, time = 0] -> skip xxxxxx"
sleep 4

# transfer a token
${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1}
# send a message
docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes"

expectUnrelayedCount "unrelayed-packets" "src" 1
expectUnrelayedCount "unrelayed-acknowledgements" "dst" 0
Expand All @@ -60,7 +60,7 @@ sleep 13
echo "xxxxxxx ${SECONDS} relay service [packets = 1, time = 20] -> skip xxxxxx"
sleep 4

${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1}
docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes"

expectUnrelayedCount "unrelayed-packets" "src" 2
expectUnrelayedCount "unrelayed-acknowledgements" "dst" 0
Expand All @@ -72,9 +72,9 @@ sleep 4
expectUnrelayedCount "unrelayed-packets" "src" 0
expectUnrelayedCount "unrelayed-acknowledgements" "dst" 2

${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1}
${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1}
${RLY} tx transfer ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1}
docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes"
docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes"
docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes"

expectUnrelayedCount "unrelayed-packets" "src" 3
expectUnrelayedCount "unrelayed-acknowledgements" "dst" 2
Expand Down
6 changes: 2 additions & 4 deletions tests/cases/tm2tm/scripts/test-tx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ TM_ADDRESS1=$(${RLY} tendermint keys show ibc1 testkey)

echo "!!! ibc0 -> ibc1 !!!"

docker exec tendermint-chain0 sh -c \
"simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes"
docker exec tendermint-chain0 sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS0} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes"
sleep ${TX_INTERNAL}
${RLY} tx relay --do-refresh ibc01 --src-seqs 1
sleep ${TX_INTERNAL}
${RLY} tx acks --do-refresh ibc01 --dst-seqs 1

echo "!!! ibc1 -> ibc0 !!!"

docker exec tendermint-chain1 sh -c \
"simd --home /root/data/ibc1 tx --keyring-backend=test --from ${TM_ADDRESS1} --chain-id ibc1 mockapp send mockapp channel-0 'mock packet data' --yes"
docker exec tendermint-chain1 sh -c "simd --home /root/data/ibc1 tx --keyring-backend=test --from ${TM_ADDRESS1} --chain-id ibc1 mockapp send mockapp channel-0 'mock packet data' --yes"
sleep ${TX_INTERNAL}
${RLY} tx relay --do-refresh ibc01 --dst-seqs 1
sleep ${TX_INTERNAL}
Expand Down

0 comments on commit aa74f8b

Please sign in to comment.