Skip to content

Commit

Permalink
fixed UT that broke
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsitrin committed Apr 3, 2024
1 parent 711a6ca commit 76bb88a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions block/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ func TestBlockProductionNodeHealth(t *testing.T) {
// 5. Produce third block successfully
func TestProduceBlockFailAfterCommit(t *testing.T) {
require := require.New(t)
assert := assert.New(t)
// Setup app
app := testutil.GetAppMock(testutil.Info, testutil.Commit)
// Create proxy app
Expand Down Expand Up @@ -382,11 +381,14 @@ func TestProduceBlockFailAfterCommit(t *testing.T) {
mockStore.ShouldFailSetHeight = tc.shouldFailSetSetHeight
mockStore.ShoudFailUpdateState = tc.shouldFailUpdateState
_ = manager.produceBlock(context.Background(), true)
assert.Equal(tc.expectedStoreHeight, manager.store.Height())
assert.Equal(tc.expectedStateAppHash, manager.lastState.AppHash)
require.Equal(tc.expectedStoreHeight, manager.store.Height(), tc.name)
require.Equal(tc.expectedStateAppHash, manager.lastState.AppHash, tc.name)
storeState, err := manager.store.LoadState()
require.NoError(err)
assert.Equal(tc.expectedStateAppHash, storeState.AppHash)
require.Equal(tc.expectedStateAppHash, storeState.AppHash, tc.name)

app.On("Commit", mock.Anything).Unset()
app.On("Info", mock.Anything).Unset()
})
}
}
Expand Down

0 comments on commit 76bb88a

Please sign in to comment.