-
Notifications
You must be signed in to change notification settings - Fork 537
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
Ensure sufficient test coverage around recent changes to compression/grouping config in tests #23693
Ensure sufficient test coverage around recent changes to compression/grouping config in tests #23693
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
packages/test/test-end-to-end-tests/src/test/messageSize.spec.ts:1
- The function should ensure that sizeInBytes is even before calling crypto.randomBytes to prevent potential runtime errors.
generateRandomStringOfSize = (sizeInBytes: number): string =>
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.
I was just peeking - not able to provide competent review at this time.
@@ -1264,7 +1264,34 @@ describe("Runtime", () => { | |||
"Ops with unrecognized type should fail to process", | |||
); | |||
}); | |||
|
|||
it.only("Throws when op compression is on and op grouping is off", async () => { |
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.
Build (lint) fails with this saying only
is not allowed, right?
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.
Yes, I accidentally missed that, thanks for pointing it out!
localMap.set(`key${i}`, content); | ||
} | ||
itExpects( | ||
`Batch with 4000 ops - grouped batches`, |
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.
What do you think - would this be worth testing with both grouping and compression disabled? If it feels worth it to you, maybe pull it out and do the [true, false].forEach
thing. If not, then just leave it.
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.
I feel like it isn't, because in the original flow, it used to compress those 4000 ops with the empty placeholders, but since we no longer support that flow I find it unnecessary to create a test where both are disabled.
@@ -1268,7 +1268,34 @@ describe("Runtime", () => { | |||
"Ops with unrecognized type should fail to process", | |||
); | |||
}); | |||
|
|||
it("Throws when op compression is on and op grouping is off", async () => { |
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.
Perfect test case! It doesn't belong under the "Unrecognized types" block though. You can just put it at the very top (not under another describe
), or add a describe
called somethign like "runtimeOptions validation"
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.
Added change
Description
See the test changes (and PR comments) in this PR: [BREAKING IN 2.20] Added assert for compression ON grouping OFF by MarioJGMsoft · Pull Request #23608 · microsoft/FluidFramework
There were some tests that had compression enabled but grouping disabled. We had to choose to either enable grouping or disable compression in that PR. We should revisit each case and consider if the other should be added as well.
Reviewer Guidance
Let me know if you think there's anything else that I'm missing or that should be tested.
Fixes: AB#28720