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

Fix and reorganize stashed ops that wait for a summary #23542

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dannimad
Copy link
Contributor

@dannimad dannimad commented Jan 14, 2025

Some tests among stashedOps.spec.ts need to wait for a summary in order to fall into its test scenario. There was some missing configuration on them:

  • ensureSynchonized should be called before summarizing to ensure that it summaries all changes up to that point.
  • When created the provider via getTestObjectProvider, pass in option { syncSummarizer: true } so that ensureSynchonized will sync summarizer clients.
  • explicitly load summarizers from the snapshot generated by previous summarizers by specifying the version of that snapshot

Besides those changes, I made some reorganization to these tests since added config is necessary only for tests that wait for a summary so I separated them into a different file and move some functions to a utils file well.

Some of these tests are currently failing in ODSP and so I'll head up OCE in case they keep failing after this PR is merged. If this approach work, I'll use it for refresh snapshot tests that are currently failing for what I suspect the same reason.

@Copilot Copilot bot review requested due to automatic review settings January 14, 2025 02:01
@github-actions github-actions bot added base: main PRs targeted against main branch area: tests Tests to add, test infrastructure improvements, etc labels Jan 14, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

packages/test/test-end-to-end-tests/src/test/offline/offlineTestsUtils.ts:43

  • [nitpick] The magic number 30 should be defined as a constant or passed as a parameter for better readability and maintainability.
const lots = 30;

packages/test/test-end-to-end-tests/src/test/offline/containerDirtyFlag.spec.ts:31

  • Ensure that map2 is properly initialized before using it. Add a check to verify that map2 is not null or undefined.
const map2 = await dataStore2.getSharedObject<ISharedMap>(mapId);

export async function loadOffline(
testContainerConfig: ITestContainerConfig,
testObjectProvider: ITestObjectProvider,
request: IRequest,
Copy link
Preview

Copilot AI Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The request parameter should be validated to ensure it is not null or undefined before being used.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant