diff --git a/packages/test/test-end-to-end-tests/src/test/attributionEndToEnd.spec.ts b/packages/test/test-end-to-end-tests/src/test/attributionEndToEnd.spec.ts index 1c675ceab94a..8cb5c106dc51 100644 --- a/packages/test/test-end-to-end-tests/src/test/attributionEndToEnd.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/attributionEndToEnd.spec.ts @@ -119,7 +119,6 @@ describeCompat("Attributor", "NoCompat", (getTestObjectProvider, apis) => { const getTestConfig = ( enable: boolean = false, - summaryVersion?: string, disableSummaries: boolean = true, ): ITestContainerConfig => ({ ...testContainerConfig, @@ -135,7 +134,6 @@ describeCompat("Attributor", "NoCompat", (getTestObjectProvider, apis) => { track: enable, policyFactory: createInsertOnlyAttributionPolicy, }, - [LoaderHeader.version]: summaryVersion, } as any, }, runtimeOptions: disableSummaries @@ -170,8 +168,13 @@ describeCompat("Attributor", "NoCompat", (getTestObjectProvider, apis) => { */ itSkipsFailureOnSpecificDrivers( "Can attribute content from multiple collaborators", - ["tinylicious", "t9s", "r11s"], - async () => { + ["tinylicious", "t9s"], + async function () { + // Skip tests for r11s drivers due to timeout issues because of certain network calls + // taking longer time and this test has nothing to do with r11s driver. + if (provider.driver.type === "r11s" || provider.driver.type === "routerlicious") { + this.skip(); + } const container1 = await provider.makeTestContainer(getTestConfig(true)); const sharedString1 = await sharedStringFromContainer(container1); const container2 = await provider.loadTestContainer(getTestConfig(true)); @@ -208,60 +211,60 @@ describeCompat("Attributor", "NoCompat", (getTestObjectProvider, apis) => { }, ); - itSkipsFailureOnSpecificDrivers( - "attributes content created in a detached state", - ["r11s"], - async () => { - const loader = provider.makeTestLoader(getTestConfig(true)); - const defaultCodeDetails: IFluidCodeDetails = { - package: "defaultTestPackage", - config: {}, - }; - const container1 = await loader.createDetachedContainer(defaultCodeDetails); - const sharedString1 = await sharedStringFromContainer(container1); + it("attributes content created in a detached state", async function () { + // Skip tests for r11s drivers due to timeout issues because of certain network calls + // taking longer time and this test has nothing to do with r11s driver. + if (provider.driver.type === "r11s" || provider.driver.type === "routerlicious") { + this.skip(); + } + const loader = provider.makeTestLoader(getTestConfig(true)); + const defaultCodeDetails: IFluidCodeDetails = { + package: "defaultTestPackage", + config: {}, + }; + const container1 = await loader.createDetachedContainer(defaultCodeDetails); + const sharedString1 = await sharedStringFromContainer(container1); - const text = "client 1"; - sharedString1.insertText(0, text); - await container1.attach(provider.driver.createCreateNewRequest("doc id")); - await provider.ensureSynchronized(); + const text = "client 1"; + sharedString1.insertText(0, text); + await container1.attach(provider.driver.createCreateNewRequest("doc id")); + await provider.ensureSynchronized(); - const url = await container1.getAbsoluteUrl(""); - assert(url !== undefined); - const loader2 = provider.makeTestLoader(getTestConfig(true)); - const container2 = await loader2.resolve({ url }); + const url = await container1.getAbsoluteUrl(""); + assert(url !== undefined); + const loader2 = provider.makeTestLoader(getTestConfig(true)); + const container2 = await loader2.resolve({ url }); - const sharedString2 = await sharedStringFromContainer(container2); - sharedString2.insertText(0, "client 2, "); + const sharedString2 = await sharedStringFromContainer(container2); + sharedString2.insertText(0, "client 2, "); - await provider.ensureSynchronized(); - assert.equal(sharedString1.getText(), "client 2, client 1"); + await provider.ensureSynchronized(); + assert.equal(sharedString1.getText(), "client 2, client 1"); - assert( - container1.clientId !== undefined && container2.clientId !== undefined, - "Both containers should have client ids.", - ); - const attributor = await getAttributorFromContainer(container1); - assertAttributionMatches(sharedString1, 3, attributor, { - user: container1.audience.getMember(container2.clientId)?.user, - }); - assertAttributionMatches(sharedString1, 13, attributor, "detached"); + assert( + container1.clientId !== undefined && container2.clientId !== undefined, + "Both containers should have client ids.", + ); + const attributor = await getAttributorFromContainer(container1); + assertAttributionMatches(sharedString1, 3, attributor, { + user: container1.audience.getMember(container2.clientId)?.user, + }); + assertAttributionMatches(sharedString1, 13, attributor, "detached"); - const attributor2 = await getAttributorFromContainer(container2); - assertAttributionMatches(sharedString2, 3, attributor2, { - user: container1.audience.getMember(container2.clientId)?.user, - }); - assertAttributionMatches(sharedString2, 13, attributor2, "detached"); - }, - ); + const attributor2 = await getAttributorFromContainer(container2); + assertAttributionMatches(sharedString2, 3, attributor2, { + user: container1.audience.getMember(container2.clientId)?.user, + }); + assertAttributionMatches(sharedString2, 13, attributor2, "detached"); + }); - it("repopulates attribution association data using the summary tree", async () => { + it("repopulates attribution association data using the summary tree", async function () { const container1 = await provider.makeTestContainer(getTestConfig(true)); const sharedString1 = await sharedStringFromContainer(container1); const attributor1 = await getAttributorFromContainer(container1); const text = "client 1"; sharedString1.insertText(0, text); - // await container1.attach(provider.driver.createCreateNewRequest("doc id")); await provider.ensureSynchronized(); sharedString1.insertText(0, "client 2, "); await provider.ensureSynchronized(); @@ -269,14 +272,14 @@ describeCompat("Attributor", "NoCompat", (getTestObjectProvider, apis) => { const summarizer = await createSummarizer( provider, container1, - getTestConfig(true, undefined, false), + getTestConfig(true, false), ); await provider.ensureSynchronized(); const summaryResult = await summarizeNow(summarizer.summarizer); - const container2 = await provider.loadTestContainer( - getTestConfig(true, summaryResult.summaryVersion), - ); + const container2 = await provider.loadTestContainer(getTestConfig(true), { + [LoaderHeader.version]: summaryResult.summaryVersion, + }); const sharedString2 = await sharedStringFromContainer(container2); const attributor2 = await getAttributorFromContainer(container2); diff --git a/packages/test/test-end-to-end-tests/src/test/cellAttributionEndToEnd.spec.ts b/packages/test/test-end-to-end-tests/src/test/cellAttributionEndToEnd.spec.ts index 2ca8807b9546..26137e22e2be 100644 --- a/packages/test/test-end-to-end-tests/src/test/cellAttributionEndToEnd.spec.ts +++ b/packages/test/test-end-to-end-tests/src/test/cellAttributionEndToEnd.spec.ts @@ -130,8 +130,13 @@ describeCompat("Attributor for SharedCell", "NoCompat", (getTestObjectProvider, */ itSkipsFailureOnSpecificDrivers( "Can attribute content from multiple collaborators", - ["tinylicious", "t9s", "r11s"], - async () => { + ["tinylicious", "t9s"], + async function () { + // Skip tests for r11s drivers due to timeout issues because of certain network calls + // taking longer time and this test has nothing to do with r11s driver. + if (provider.driver.type === "r11s" || provider.driver.type === "routerlicious") { + this.skip(); + } const container1 = await provider.makeTestContainer(getTestConfig(true)); const sharedCell1 = await sharedCellFromContainer(container1); const container2 = await provider.loadTestContainer(getTestConfig(true)); @@ -169,43 +174,44 @@ describeCompat("Attributor for SharedCell", "NoCompat", (getTestObjectProvider, }, ); - itSkipsFailureOnSpecificDrivers( - "attributes content created in a detached state", - ["r11s"], - async () => { - const loader = provider.makeTestLoader(getTestConfig(true)); - const defaultCodeDetails: IFluidCodeDetails = { - package: "defaultTestPackage", - config: {}, - }; - const container1 = await loader.createDetachedContainer(defaultCodeDetails); - const sharedCell1 = await sharedCellFromContainer(container1); - - sharedCell1.set(1); - const attributor1 = await getAttributorFromContainer(container1); - assertAttributionMatches(sharedCell1, attributor1, "detached"); - - await container1.attach(provider.driver.createCreateNewRequest("doc id")); - await provider.ensureSynchronized(); - - const url = await container1.getAbsoluteUrl(""); - assert(url !== undefined); - const loader2 = provider.makeTestLoader(getTestConfig()); - const container2 = await loader2.resolve({ url }); - - const sharedCell2 = await sharedCellFromContainer(container2); - sharedCell2.set(2); - - await provider.ensureSynchronized(); - - assert( - container1.clientId !== undefined && container2.clientId !== undefined, - "Both containers should have client ids.", - ); - - assertAttributionMatches(sharedCell1, attributor1, { - user: container1.audience.getMember(container2.clientId)?.user, - }); - }, - ); + it("attributes content created in a detached state", async function () { + // Skip tests for r11s drivers due to timeout issues because of certain network calls + // taking longer time and this test has nothing to do with r11s driver. + if (provider.driver.type === "r11s" || provider.driver.type === "routerlicious") { + this.skip(); + } + const loader = provider.makeTestLoader(getTestConfig(true)); + const defaultCodeDetails: IFluidCodeDetails = { + package: "defaultTestPackage", + config: {}, + }; + const container1 = await loader.createDetachedContainer(defaultCodeDetails); + const sharedCell1 = await sharedCellFromContainer(container1); + + sharedCell1.set(1); + const attributor1 = await getAttributorFromContainer(container1); + assertAttributionMatches(sharedCell1, attributor1, "detached"); + + await container1.attach(provider.driver.createCreateNewRequest("doc id")); + await provider.ensureSynchronized(); + + const url = await container1.getAbsoluteUrl(""); + assert(url !== undefined); + const loader2 = provider.makeTestLoader(getTestConfig()); + const container2 = await loader2.resolve({ url }); + + const sharedCell2 = await sharedCellFromContainer(container2); + sharedCell2.set(2); + + await provider.ensureSynchronized(); + + assert( + container1.clientId !== undefined && container2.clientId !== undefined, + "Both containers should have client ids.", + ); + + assertAttributionMatches(sharedCell1, attributor1, { + user: container1.audience.getMember(container2.clientId)?.user, + }); + }); });