Skip to content

Commit

Permalink
integrates timeouts in TestABCIResponsesSaveLoad1
Browse files Browse the repository at this point in the history
  • Loading branch information
staheri14 committed Sep 25, 2024
1 parent 98feed8 commit 9ecf2d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions state/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ func TestABCIResponsesSaveLoad1(t *testing.T) {

abciResponses.DeliverTxs[0] = &abci.ResponseDeliverTx{Data: []byte("foo"), Events: nil}
abciResponses.DeliverTxs[1] = &abci.ResponseDeliverTx{Data: []byte("bar"), Log: "ok", Events: nil}
abciResponses.EndBlock = &abci.ResponseEndBlock{ValidatorUpdates: []abci.ValidatorUpdate{
types.TM2PB.NewValidatorUpdate(ed25519.GenPrivKey().PubKey(), 10),
}}
abciResponses.EndBlock = &abci.ResponseEndBlock{
ValidatorUpdates: []abci.ValidatorUpdate{types.TM2PB.NewValidatorUpdate(ed25519.GenPrivKey().PubKey(), 10)},
Timeouts: abci.TimeoutsInfo{TimeoutPropose: 1 * time.Second, TimeoutCommit: 2 * time.Second}}

err := stateStore.SaveABCIResponses(block.Height, abciResponses)
require.NoError(t, err)
Expand All @@ -204,6 +204,7 @@ func TestABCIResponsesSaveLoad1(t *testing.T) {
assert.Equal(abciResponses, loadedABCIResponses,
fmt.Sprintf("ABCIResponses don't match:\ngot: %v\nexpected: %v\n",
loadedABCIResponses, abciResponses))

}

// TestResultsSaveLoad tests saving and loading ABCI results.
Expand Down

0 comments on commit 9ecf2d1

Please sign in to comment.