-
Notifications
You must be signed in to change notification settings - Fork 557
Add negative testing to frozen container #25562
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
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.
Pull Request Overview
This PR adds negative testing to frozen containers to validate that certain operations behave as expected when performed on containers loaded from a frozen state. The tests verify that storage operations fail appropriately and that containers maintain their expected state during snapshot refresh scenarios.
Key changes:
- Added three new test cases for frozen container behavior validation
- Added dependencies for string manipulation and timer mocking utilities
- Implemented tests for blob upload restrictions, attach operation limitations, and snapshot refresh behavior
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| loadFrozenContainerFromPendingState.spec.ts | Added three new test cases to validate frozen container behavior for blob uploads, attach operations, and snapshot refresh scenarios |
| package.json | Added @fluid-internal/client-utils as a dev dependency to support string buffer operations in tests |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
packages/test/local-server-tests/src/test/loadFrozenContainerFromPendingState.spec.ts
Outdated
Show resolved
Hide resolved
packages/test/local-server-tests/src/test/loadFrozenContainerFromPendingState.spec.ts
Outdated
Show resolved
Hide resolved
packages/test/local-server-tests/src/test/loadFrozenContainerFromPendingState.spec.ts
Outdated
Show resolved
Hide resolved
packages/test/local-server-tests/src/test/loadFrozenContainerFromPendingState.spec.ts
Outdated
Show resolved
Hide resolved
| this.storageAdapter, | ||
| offlineLoadEnabled, | ||
| this, | ||
| storageOnly, |
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.
you probably want to make this a getter, as the state can change
| let codeLoader: CreateLoaderDefaultResults["codeLoader"]; | ||
|
|
||
| const { urlResolver, codeDetails, codeLoader, loaderProps } = createLoader({ | ||
| beforeEach(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.
please don't use before each like this. all the global vars make the test very hard to maintain and debug. if you want reuse functionally put it in a function, and call the function from the tests
|
you should split this into two PR, one that changes refresh behavior, and one that adds tests unrelated to refresh |
PR that exclusively adds more testing to frozen container. It adds the same tests as #25562 solving comments on that PR by adding an initialization function and removing the snapshot refresh change.
Adding a couple of tests to frozen containers to validate expected behavior while doing certain actions like storage calls, attaching or refreshing the base snapshot.
Disable snapshot refresh when in read connection mode