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

tests: fix use of require.EventuallyWithT #1376

Merged
merged 3 commits into from
Nov 4, 2024
Merged

Conversation

darioush
Copy link
Collaborator

@darioush darioush commented Oct 29, 2024

Fixing a couple tests based on this observation:

func TestXxx(t *testing.T) {
	pass := time.Now().Add(1 * time.Second)
	require.EventuallyWithT(t,
		func(c *assert.CollectT) {
			// Both cases fail:
			//require.True(t, time.Now().After(pass))
			//require.True(c, time.Now().After(pass))
			assert.True(c, time.Now().After(pass))
		},
		5*time.Second, 500*time.Millisecond)
}

unfortunately, it can be seen on the windows CI run that this doesn't fix the flakiness of TestTransactionSkipIndexing

@darioush darioush marked this pull request as ready for review October 29, 2024 19:00
@darioush darioush requested review from ceyonur and a team as code owners October 29, 2024 19:00
@darioush darioush enabled auto-merge (squash) November 4, 2024 17:56
@darioush darioush merged commit 4e0e5d2 into master Nov 4, 2024
14 checks passed
@darioush darioush deleted the use-eventually-with branch November 4, 2024 18:13
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 this pull request may close these issues.

2 participants