-
Notifications
You must be signed in to change notification settings - Fork 371
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
Fix awaitData
cursors
#3961
base: main
Are you sure you want to change the base?
Fix awaitData
cursors
#3961
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI fails after merging #3940
|
||
collName := testutil.CollectionName(t) | ||
|
||
ready <- struct{}{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not ready with the setup yet at this point. This should be moved lower
@@ -308,6 +308,122 @@ func TestCursorsTailableAwaitData(t *testing.T) { | |||
}) | |||
} | |||
|
|||
func TestCursorsTailableAwaitDataAfterInsertStress(t *testing.T) { | |||
if !setup.IsMongoDB(t) { | |||
t.Skip("https://github.com/FerretDB/FerretDB/pull/3961") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should link to issues, not to PRs.
And can we use expected failure instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the subtests pass, and usually one of them fails, so not really
teststress.Stress(t, func(ready chan<- struct{}, start <-chan struct{}) { | ||
testID := count.Add(1) | ||
|
||
t.Run(fmt.Sprint(testID), func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t.Run
doesn't run in parallel, effectively un-stressing the test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my testing it seems it's not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, please explain how t.Run
works then
var firstBatch *types.Array | ||
firstBatch, cursorID = getFirstBatch(t, res) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var firstBatch *types.Array | |
firstBatch, cursorID = getFirstBatch(t, res) | |
var firstBatch *types.Array | |
firstBatch, cursorID := getFirstBatch(t, res) |
There is no need to define cursorID
above either.
(I wonder why everyone suddenly started using var
instead of short variables assignments…)
awaitData
cursorsawaitData
cursors
cd27358
to
a7ac09b
Compare
On hold for now |
Description
Closes #3957.
Readiness checklist
task all
, and it passed.@FerretDB/core
), Milestone (Next
), Labels, Project and project's Sprint fields.