Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

occasional incorrect block hash with TestValidatorStateMachine/MultipleBlockProposals #1136

Closed
jchappelow opened this issue Dec 9, 2024 · 0 comments · Fixed by #1150
Closed
Assignees

Comments

@jchappelow
Copy link
Member

jchappelow commented Dec 9, 2024

https://github.com/kwilteam/kwil-db/actions/runs/12240833385/job/34144591773#step:10:340

Rerun resolves. Something allows it to diverge randomly.

A related issue is that the block hash mismatch should cause the eventually to fail fast. We can use EventuallyWithT to have the test fail fast for some errors that are never going to change (and just keep iterating when conditions indicate it's just not there yet.

e.g.

	require.EventuallyWithT(t, func(c *assert.CollectT) {
		val, err := check(...)
		assert.NoError(c, err) // record error on c, this iteration did not succeed => keep trying
		require.Equal(t, val, 99) // fail on outer t, fail fase
	})

I might have that a little mixed up, but I think we can get fast failure behavior with this updated function. See stretchr/testify#1396 (comment) for more discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants