Skip to content

Commit 0f877b4

Browse files
authored
Revert "refactor(azure-client-e2e-tests): Import from more realistic places" (#23755)
Reverts #23647 This change was causing [azure-client end-to-end test pipeline stages](https://dev.azure.com/fluidframework/internal/_build?definitionId=80) to fail due to failure when installing dev builds of the fluid-framework package. Related Teams thread: [Looking for ideas: grabbing non-scoped packages from our int...](https://teams.microsoft.com/l/message/19:[email protected]/1738021044873?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=9ce27575-2f82-4689-abdb-bcff07e8063b&parentMessageId=1738021044873&teamName=Fluid%20Framework&channelName=Dev&createdTime=1738021044873)
1 parent 037800a commit 0f877b4

File tree

9 files changed

+46
-38
lines changed

9 files changed

+46
-38
lines changed

packages/service-clients/end-to-end-tests/azure-client/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,18 @@
7272
"@fluidframework/core-interfaces": "workspace:~",
7373
"@fluidframework/counter": "workspace:~",
7474
"@fluidframework/datastore-definitions": "workspace:~",
75-
"@fluidframework/map-1dot4": "npm:@fluidframework/map@^1.4.0",
75+
"@fluidframework/fluid-static": "workspace:~",
76+
"@fluidframework/map": "workspace:~",
77+
"@fluidframework/map-legacy": "npm:@fluidframework/map@^1.4.0",
78+
"@fluidframework/matrix": "workspace:~",
7679
"@fluidframework/runtime-definitions": "workspace:~",
80+
"@fluidframework/sequence": "workspace:~",
7781
"@fluidframework/telemetry-utils": "workspace:~",
7882
"@fluidframework/test-runtime-utils": "workspace:~",
7983
"@fluidframework/test-utils": "workspace:~",
84+
"@fluidframework/tree": "workspace:~",
8085
"axios": "^1.7.7",
8186
"cross-env": "^7.0.3",
82-
"fluid-framework": "workspace:~",
8387
"mocha": "^10.2.0",
8488
"mocha-multi-reporters": "^1.5.1",
8589
"moment": "^2.21.0",

packages/service-clients/end-to-end-tests/azure-client/src/test/audience.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ import { strict as assert } from "node:assert";
88
import { AzureClient, type AzureContainerServices } from "@fluidframework/azure-client";
99
import { AttachState } from "@fluidframework/container-definitions";
1010
import { ConnectionState } from "@fluidframework/container-loader";
11+
import { ContainerSchema, type IFluidContainer } from "@fluidframework/fluid-static";
12+
import { SharedMap } from "@fluidframework/map/internal";
1113
import { timeoutPromise } from "@fluidframework/test-utils/internal";
1214
import { AxiosResponse } from "axios";
13-
import { ContainerSchema, type IFluidContainer } from "fluid-framework";
14-
// eslint-disable-next-line import/no-internal-modules -- Need SharedMap to test it
15-
import { SharedMap } from "fluid-framework/legacy";
1615

1716
import {
1817
createAzureClient,

packages/service-clients/end-to-end-tests/azure-client/src/test/containerCreate.spec.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ import {
1414
MessageType,
1515
ISequencedDocumentMessage,
1616
} from "@fluidframework/driver-definitions/internal";
17-
import { SharedMap as SharedMap_1dot4 } from "@fluidframework/map-1dot4";
17+
import { ContainerSchema, type IFluidContainer } from "@fluidframework/fluid-static";
18+
import { SharedMap } from "@fluidframework/map/internal";
19+
import { SharedMap as SharedMapLegacy } from "@fluidframework/map-legacy";
1820
import { MockLogger } from "@fluidframework/telemetry-utils/internal";
1921
import { timeoutPromise } from "@fluidframework/test-utils/internal";
2022
import { AxiosResponse } from "axios";
21-
import { ContainerSchema, type IFluidContainer } from "fluid-framework";
22-
// eslint-disable-next-line import/no-internal-modules -- Need SharedMap to test it
23-
import { SharedMap } from "fluid-framework/legacy";
2423
import type { SinonSandbox } from "sinon";
2524
import { createSandbox } from "sinon";
2625

@@ -286,7 +285,7 @@ for (const testOpts of testMatrix) {
286285

287286
const schemaLegacy = {
288287
initialObjects: {
289-
map1: SharedMap_1dot4,
288+
map1: SharedMapLegacy,
290289
},
291290
};
292291

@@ -325,7 +324,7 @@ for (const testOpts of testMatrix) {
325324
(resolve) => {
326325
const confirmValueSet = (): void => {
327326
if (
328-
(containerLegacy.initialObjects.map1 as SharedMap_1dot4).get("key") === "value"
327+
(containerLegacy.initialObjects.map1 as SharedMapLegacy).get("key") === "value"
329328
) {
330329
containerLegacy.off("saved", confirmValueSet);
331330
resolve();
@@ -338,7 +337,7 @@ for (const testOpts of testMatrix) {
338337
errorMsg: "valueSet timeout",
339338
},
340339
);
341-
(containerLegacy.initialObjects.map1 as SharedMap_1dot4).set("key", "value");
340+
(containerLegacy.initialObjects.map1 as SharedMapLegacy).set("key", "value");
342341

343342
// Await the value being saved, especially important if we dispose the legacy container.
344343
await valueSetP;
@@ -393,7 +392,7 @@ for (const testOpts of testMatrix) {
393392

394393
const schemaLegacy = {
395394
initialObjects: {
396-
map1: SharedMap_1dot4,
395+
map1: SharedMapLegacy,
397396
},
398397
};
399398

@@ -451,7 +450,7 @@ for (const testOpts of testMatrix) {
451450
});
452451
}
453452

454-
const result = (containerLegacy.initialObjects.map1 as SharedMap_1dot4).get<string>(
453+
const result = (containerLegacy.initialObjects.map1 as SharedMapLegacy).get<string>(
455454
"key",
456455
);
457456
assert.strictEqual(result, "value", "Value not found in copied container");
@@ -581,7 +580,7 @@ for (const testOpts of testMatrix) {
581580
});
582581
}
583582

584-
const legacyMap = containerLegacy.initialObjects.map1 as SharedMap_1dot4;
583+
const legacyMap = containerLegacy.initialObjects.map1 as SharedMapLegacy;
585584

586585
// Verify ops are processed by legacy AzureClient
587586
assert.strictEqual(legacyMap.get("1"), 1);

packages/service-clients/end-to-end-tests/azure-client/src/test/ddsTests.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ import { strict as assert } from "node:assert";
88
import { AzureClient } from "@fluidframework/azure-client";
99
import { ConnectionState } from "@fluidframework/container-loader";
1010
import { IFluidHandle } from "@fluidframework/core-interfaces";
11+
import { ContainerSchema, type IFluidContainer } from "@fluidframework/fluid-static";
12+
import { type ISharedMap, SharedMap } from "@fluidframework/map/internal";
1113
import { timeoutPromise } from "@fluidframework/test-utils/internal";
1214
import { AxiosResponse } from "axios";
13-
import { ContainerSchema, type IFluidContainer } from "fluid-framework";
14-
// eslint-disable-next-line import/no-internal-modules -- Need SharedMap to test it
15-
import { type ISharedMap, SharedMap } from "fluid-framework/legacy";
1615

1716
import {
1817
createAzureClient,

packages/service-clients/end-to-end-tests/azure-client/src/test/signals.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import { strict as assert } from "node:assert";
88
import { AzureClient, type AzureContainerServices } from "@fluidframework/azure-client";
99
import { AttachState } from "@fluidframework/container-definitions";
1010
import { ConnectionState } from "@fluidframework/container-loader";
11+
import { type ContainerSchema, type IFluidContainer } from "@fluidframework/fluid-static";
1112
import { timeoutPromise } from "@fluidframework/test-utils/internal";
1213
import type { AxiosResponse } from "axios";
13-
import { type ContainerSchema, type IFluidContainer } from "fluid-framework";
1414

1515
import {
1616
createAzureClient,

packages/service-clients/end-to-end-tests/azure-client/src/test/tree.spec.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,17 @@ import { strict as assert } from "node:assert";
77

88
import { AzureClient } from "@fluidframework/azure-client";
99
import { ConnectionState } from "@fluidframework/container-loader";
10+
import { ContainerSchema, type IFluidContainer } from "@fluidframework/fluid-static";
1011
import { timeoutPromise } from "@fluidframework/test-utils/internal";
11-
import type { AxiosResponse } from "axios";
12+
import { TreeViewConfiguration, SchemaFactory, type TreeView } from "@fluidframework/tree";
1213
import {
13-
ContainerSchema,
14-
type IFluidContainer,
14+
asTreeViewAlpha,
1515
SharedTree,
1616
Tree,
1717
TreeStatus,
1818
type Revertible,
19-
TreeViewConfiguration,
20-
SchemaFactory,
21-
type TreeView,
22-
} from "fluid-framework";
23-
// eslint-disable-next-line import/no-internal-modules -- Need asTreeViewAlpha to test it
24-
import { asTreeViewAlpha } from "fluid-framework/alpha";
19+
} from "@fluidframework/tree/internal";
20+
import type { AxiosResponse } from "axios";
2521

2622
import {
2723
createAzureClient,
@@ -302,6 +298,7 @@ for (const testOpts of testMatrix) {
302298

303299
it("can listen to events on a recursive tree", async () => {
304300
class Doll extends sf.objectRecursive("Matryoshka", {
301+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
305302
nested: sf.optionalRecursive([() => Doll]),
306303
}) {}
307304

packages/service-clients/end-to-end-tests/azure-client/src/test/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55

66
import { AzureMember, IAzureAudience } from "@fluidframework/azure-client";
77
import type { ConfigTypes, IConfigProviderBase } from "@fluidframework/core-interfaces";
8-
import { IMember } from "fluid-framework";
9-
// eslint-disable-next-line import/no-internal-modules -- Used in helper logic for tests
10-
import { type ISharedMap, IValueChanged } from "fluid-framework/legacy";
8+
import { IMember } from "@fluidframework/fluid-static";
9+
import { ISharedMap, IValueChanged } from "@fluidframework/map/internal";
1110

1211
export const waitForMember = async (
1312
audience: IAzureAudience,

packages/service-clients/end-to-end-tests/azure-client/src/test/viewContainerVersion.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ import { strict as assert } from "node:assert";
77

88
import { AzureClient } from "@fluidframework/azure-client";
99
import { ConnectionState } from "@fluidframework/container-loader";
10+
import { ContainerSchema, type IFluidContainer } from "@fluidframework/fluid-static";
11+
import { SharedMap } from "@fluidframework/map/internal";
1012
import { timeoutPromise } from "@fluidframework/test-utils/internal";
1113
import { AxiosResponse } from "axios";
12-
import { ContainerSchema, type IFluidContainer } from "fluid-framework";
13-
// eslint-disable-next-line import/no-internal-modules -- Need SharedMap to test it
14-
import { SharedMap } from "fluid-framework/legacy";
1514

1615
import {
1716
createAzureClient,

pnpm-lock.yaml

Lines changed: 16 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)