Browse Source

fix e2e app test (#6223)

pull/6234/head
Callum Waters 4 years ago
committed by GitHub
parent
commit
6b4024ad75
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      test/e2e/tests/app_test.go

+ 5
- 5
test/e2e/tests/app_test.go View File

@ -81,17 +81,19 @@ func TestApp_Tx(t *testing.T) {
value := fmt.Sprintf("%x", bz) value := fmt.Sprintf("%x", bz)
tx := types.Tx(fmt.Sprintf("%v=%v", key, value)) tx := types.Tx(fmt.Sprintf("%v=%v", key, value))
_, err = client.BroadcastTxCommit(ctx, tx)
resp, err := client.BroadcastTxCommit(ctx, tx)
require.NoError(t, err) require.NoError(t, err)
// wait for the tx to go through
time.Sleep(1 * time.Second)
// wait for the tx to be persisted in the tx indexer
time.Sleep(500 * time.Millisecond)
hash := tx.Hash() hash := tx.Hash()
txResp, err := client.Tx(ctx, hash, false) txResp, err := client.Tx(ctx, hash, false)
require.NoError(t, err) require.NoError(t, err)
assert.Equal(t, txResp.Tx, tx) assert.Equal(t, txResp.Tx, tx)
assert.Equal(t, txResp.Height, resp.Height)
// NOTE: we don't test abci query of the light client
if node.Mode == e2e.ModeLight { if node.Mode == e2e.ModeLight {
return return
} }
@ -101,7 +103,5 @@ func TestApp_Tx(t *testing.T) {
assert.Equal(t, key, string(abciResp.Response.Key)) assert.Equal(t, key, string(abciResp.Response.Key))
assert.Equal(t, value, string(abciResp.Response.Value)) assert.Equal(t, value, string(abciResp.Response.Value))
assert.Equal(t, txResp.Height, abciResp.Response.Height)
}) })
} }

Loading…
Cancel
Save