Skip to content

Commit 5062ac4

Browse files
author
Daisuke Kanda
committed
add test-timeout to tm2tm
Signed-off-by: Daisuke Kanda <daisuke.kanda@datachain.jp>
1 parent 87f14e6 commit 5062ac4

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

tests/cases/tm2tm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ test:
1313
./scripts/init-rly
1414
./scripts/handshake
1515
./scripts/test-tx
16+
./scripts/test-timeout
1617

1718
.PHONY: network-down
1819
network-down:
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
set -eux
4+
5+
SCRIPT_DIR=$(cd $(dirname $0); pwd)
6+
RLY_BINARY=${SCRIPT_DIR}/../../../../build/yrly
7+
RLY="${RLY_BINARY} --debug"
8+
9+
# XXX set proper value
10+
TX_INTERVAL=3
11+
12+
TM_ADDRESS0=$(${RLY} tendermint keys show ibc0 testkey)
13+
TM_ADDRESS1=$(${RLY} tendermint keys show ibc1 testkey)
14+
15+
echo "!!! ibc0 -> ibc1 !!!"
16+
17+
echo "Before ibc0 balance: $(${RLY} query balance ibc0 ${TM_ADDRESS0})"
18+
echo "Before ibc1 balance: $(${RLY} query balance ibc1 ${TM_ADDRESS1})"
19+
20+
${RLY} query channel ibc01 ibc0
21+
${RLY} tx transfer --timeout-height-offset 1 ibc01 ibc0 ibc1 100samoleans ${TM_ADDRESS1}
22+
sleep ${TX_INTERVAL}
23+
24+
tmpfile=$0.log
25+
${RLY} tx relay ibc01 2>&1 | tee $tmpfile
26+
sleep ${TX_INTERVAL}
27+
28+
grep -e 'core\.(\*RelayMsgs)\.Send' $tmpfile | grep ProofUnreceived
29+
30+
echo "After ibc0 balance: $(${RLY} query balance ibc0 ${TM_ADDRESS0})"
31+
echo "After ibc1 balance: $(${RLY} query balance ibc1 ${TM_ADDRESS1})"

0 commit comments

Comments
 (0)