From d45a11dce39485453f223a972649f9d37d659b21 Mon Sep 17 00:00:00 2001 From: daesunp <138815173+daesunp@users.noreply.github.com> Date: Wed, 3 Jan 2024 08:22:00 -0800 Subject: [PATCH] unskip end to end chunk insert op test (#19026) ## Description This PR unskips the end to end chunk insert op test, as it is now working due to [PR 19009](https://github.com/microsoft/FluidFramework/pull/19009). --- .../chunked-forest/chunkEncodingEndToEnd.ts | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/dds/tree/src/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.ts b/packages/dds/tree/src/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.ts index a9741871fd04..a4b8013f5a00 100644 --- a/packages/dds/tree/src/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.ts +++ b/packages/dds/tree/src/test/feature-libraries/chunked-forest/chunkEncodingEndToEnd.ts @@ -8,7 +8,6 @@ import { ChangesetLocalId, IEditableForest, TreeStoredSchemaRepository, - mapCursorField, } from "../../../core/index.js"; import { leaf } from "../../../domains/index.js"; import { typeboxValidator } from "../../../external-utilities/index.js"; @@ -22,12 +21,10 @@ import { TreeCompressionStrategy, buildChunkedForest, createMockNodeKeyManager, - cursorForMapTreeNode, defaultSchemaPolicy, getTreeContext, intoStoredSchema, makeFieldBatchCodec, - mapTreeFromCursor, nodeKeyFieldKey, } from "../../../feature-libraries/index.js"; // eslint-disable-next-line import/no-internal-modules @@ -59,10 +56,7 @@ const fieldBatchCodec = makeFieldBatchCodec({ jsonValidator: typeboxValidator }, const sessionId = "beefbeef-beef-4000-8000-000000000001" as SessionId; const idCompressor = createIdCompressor(sessionId); -// TODO: Currently we split up a uniform chunk into several individual basicChunks for each node during op creation. -// Therefore, there is currently no way for us to retrieve a uniform chunk from the tree for us to make the proper checks, -// and the tests are expected to fail. The tests can be unskipped once uniform chunks can be inserted into the tree. -describe.skip("End to End chunked encoding", () => { +describe("End to end chunked encoding", () => { it(`insert ops shares reference with the original chunk.`, () => { const treeSchema = new TreeStoredSchemaRepository( intoStoredSchema(numberSequenceRootSchema), @@ -110,14 +104,12 @@ describe.skip("End to End chunked encoding", () => { // Check that inserted change contains chunk which is reference equal to the original chunk. const insertedChange = changeLog[0]; assert(insertedChange.builds !== undefined); - // TODO: This chunk is actually a BasicChunk which was split from the original UniformChunk split up. - // This is expected to fail currently, but should eventually pass once we have the ability to insert UniformChunk. const insertedChunk = insertedChange.builds.get(undefined)?.get(0 as ChangesetLocalId); assert.equal(insertedChunk, chunk); assert(chunk.isShared()); }); - it(`summary values are correct, and shares reference with the original chunk when inserting content.`, () => { + it.skip(`summary values are correct, and shares reference with the original chunk when inserting content.`, () => { const numberShape = new TreeShape(leaf.number.name, true, []); const chunk = new UniformChunk(numberShape.withTopLevelLength(4), [1, 2, 3, 4]); assert(!chunk.isShared()); @@ -145,19 +137,14 @@ describe.skip("End to End chunked encoding", () => { forestSummarizer.getAttachSummary(stringifier); }); - it(`summary values are correct, and shares reference with the original chunk when initializing with content.`, () => { + it.skip(`summary values are correct, and shares reference with the original chunk when initializing with content.`, () => { const numberShape = new TreeShape(leaf.number.name, true, []); const chunk = new UniformChunk(numberShape.withTopLevelLength(4), [1, 2, 3, 4]); assert(!chunk.isShared()); const flexTree = flexTreeViewWithContent({ schema: numberSequenceRootSchema, - // TODO: Replace mapping of 'fieldCursor' to 'nodeCursors' with 'chunk.cursor()' - // once 'NewFieldContent' in 'contextuallyTyped.ts' supports 'fieldCursor'. - // Current implementation is a workaround for type limitations. - initialTree: mapCursorField(chunk.cursor(), (cursor) => - cursorForMapTreeNode(mapTreeFromCursor(cursor)), - ), + initialTree: chunk.cursor(), }); const forestSummarizer = new ForestSummarizer(