@fluidframework/azure-end-to-end-tests 2.71.0 → 2.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +2 -2
- package/CHANGELOG.md +4 -4
- package/lib/test/AzureClientFactory.js.map +1 -1
- package/lib/test/TestDataObject.js +1 -1
- package/lib/test/TestDataObject.js.map +1 -1
- package/lib/test/containerCreate.spec.js +1 -1
- package/lib/test/containerCreate.spec.js.map +1 -1
- package/lib/test/multiprocess/messageTypes.js.map +1 -1
- package/package.json +25 -25
- package/src/test/AzureClientFactory.ts +1 -1
- package/src/test/TestDataObject.ts +1 -1
- package/src/test/containerCreate.spec.ts +1 -1
- package/src/test/multiprocess/messageTypes.ts +1 -1
package/.eslintrc.cjs
CHANGED
|
@@ -48,8 +48,8 @@ module.exports = {
|
|
|
48
48
|
files: ["*.spec.ts", "*.test.ts", "**/test/**"],
|
|
49
49
|
rules: {
|
|
50
50
|
// Some deprecated APIs are permissible in tests; use `warn` to keep them visible
|
|
51
|
-
"import/no-deprecated": "warn",
|
|
52
|
-
"import/no-internal-modules": [
|
|
51
|
+
"import-x/no-deprecated": "warn",
|
|
52
|
+
"import-x/no-internal-modules": [
|
|
53
53
|
"error",
|
|
54
54
|
{
|
|
55
55
|
allow: importInternalModulesAllowedForTest,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# @fluidframework/azure-end-to-end-tests
|
|
2
2
|
|
|
3
|
+
## 2.72.0
|
|
4
|
+
|
|
5
|
+
Dependency updates only.
|
|
6
|
+
|
|
3
7
|
## 2.71.0
|
|
4
8
|
|
|
5
9
|
Dependency updates only.
|
|
@@ -131,7 +135,6 @@ Dependency updates only.
|
|
|
131
135
|
- Updated server dependencies ([#21514](https://github.com/microsoft/FluidFramework/pull/21514)) [9629f1d93a](https://github.com/microsoft/FluidFramework/commit/9629f1d93a7e412c0cb2f65cc21da0c95ff8981d)
|
|
132
136
|
|
|
133
137
|
The following Fluid server dependencies have been updated to the latest version, 5.0.0. [See the full changelog.](https://github.com/microsoft/FluidFramework/blob/main/server/routerlicious/RELEASE_NOTES/5.0.0.md)
|
|
134
|
-
|
|
135
138
|
- @fluidframework/gitresources
|
|
136
139
|
- @fluidframework/server-kafka-orderer
|
|
137
140
|
- @fluidframework/server-lambdas
|
|
@@ -162,7 +165,6 @@ Dependency updates only.
|
|
|
162
165
|
### Minor Changes
|
|
163
166
|
|
|
164
167
|
- Rename `AzureMember.userName` to `AzureMember.name` and `IMember.userId` to `IMember.id` [96872186d0](https://github.com/microsoft/FluidFramework/commit/96872186d0d0f245c1fece7d19b3743e501679b6)
|
|
165
|
-
|
|
166
168
|
1. Renamed `AzureMember.userName` to `AzureMember.name` to establish uniform naming across odsp-client and azure-client.
|
|
167
169
|
2. Renamed `IMember.userId` to `IMember.id` to align with the properties received from AFR.
|
|
168
170
|
|
|
@@ -181,7 +183,6 @@ Dependency updates only.
|
|
|
181
183
|
TypeScript types and implementation code.
|
|
182
184
|
|
|
183
185
|
This means that using Fluid Framework packages require the following TypeScript settings in tsconfig.json:
|
|
184
|
-
|
|
185
186
|
- `"moduleResolution": "Node16"` with `"module": "Node16"`
|
|
186
187
|
- `"moduleResolution": "Bundler"` with `"module": "ESNext"`
|
|
187
188
|
|
|
@@ -228,7 +229,6 @@ Dependency updates only.
|
|
|
228
229
|
- Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
|
|
229
230
|
|
|
230
231
|
Dependencies on the following Fluid server package have been updated to version 2.0.1:
|
|
231
|
-
|
|
232
232
|
- @fluidframework/gitresources: 2.0.1
|
|
233
233
|
- @fluidframework/server-kafka-orderer: 2.0.1
|
|
234
234
|
- @fluidframework/server-lambdas: 2.0.1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AzureClientFactory.js","sourceRoot":"","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K,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,sBAAsB,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;AACF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAAC,QAAuB;IACxE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,OAAO,CAAC;IACtD,sEAAsE;IACtE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAW,CAAC;AAChE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tAzureClient,\n\ttype AzureLocalConnectionConfig,\n\ttype AzureRemoteConnectionConfig,\n\ttype ITelemetryBaseLogger,\n} from \"@fluidframework/azure-client\";\n// eslint-disable-next-line import/no-internal-modules -- TODO consider a test exposure to avoid /internal\nimport type { AzureClientPropsInternal } from \"@fluidframework/azure-client/internal\";\nimport {\n\tAzureClient as AzureClientLegacy,\n\ttype AzureLocalConnectionConfig as AzureLocalConnectionConfigLegacy,\n\ttype AzureRemoteConnectionConfig as AzureRemoteConnectionConfigLegacy,\n\ttype ITelemetryBaseLogger as ITelemetryBaseLoggerLegacy,\n} from \"@fluidframework/azure-client-legacy\";\nimport type { IRuntimeFactory } from \"@fluidframework/container-definitions/legacy\";\nimport type { IConfigProviderBase } from \"@fluidframework/core-interfaces\";\nimport { ScopeType } from \"@fluidframework/driver-definitions/legacy\";\nimport type { CompatibilityMode, ContainerSchema } from \"@fluidframework/fluid-static\";\nimport {\n\ttype MockLogger,\n\tcreateChildLogger,\n\tcreateMultiSinkLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\nimport { InsecureTokenProvider } from \"@fluidframework/test-runtime-utils/internal\";\nimport { default as Axios, type AxiosResponse, type AxiosRequestConfig } from \"axios\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { createAzureTokenProvider } from \"./AzureTokenFactory.js\";\n\n// eslint-disable-next-line unicorn/prefer-export-from\nexport { ScopeType };\n\n/**\n * This function will determine if local or remote mode is required (based on FLUID_CLIENT), and return a new\n * {@link AzureClient} instance based on the mode by setting the Connection config accordingly.\n */\nexport function createAzureClient(\n\tid?: string,\n\tname?: string,\n\tlogger?: MockLogger,\n\tconfigProvider?: IConfigProviderBase,\n\tscopes?: ScopeType[],\n\tcreateContainerRuntimeFactory?: ({\n\t\tschema,\n\t\tcompatibilityMode,\n\t}: {\n\t\tschema: ContainerSchema;\n\t\tcompatibilityMode: CompatibilityMode;\n\t}) => IRuntimeFactory,\n): AzureClient {\n\tconst args = process.argv.slice(2);\n\n\tconst driverIndex = args.indexOf(\"--driver\");\n\tconst r11sEndpointNameIndex = args.indexOf(\"--r11sEndpointName\");\n\n\t// Get values associated with the flags\n\tconst driver = driverIndex === -1 ? undefined : args[driverIndex + 1];\n\tconst r11sEndpointName =\n\t\tr11sEndpointNameIndex === -1 ? undefined : args[r11sEndpointNameIndex + 1];\n\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"frs-client-tenant\";\n\tconst user = {\n\t\tid: id ?? uuid(),\n\t\tname: name ?? uuid(),\n\t};\n\tconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure Fluid Relay service endpoint is missing\");\n\t}\n\n\t// use AzureClient remote mode will run against live Azure Fluid Relay.\n\t// Default to running Tinylicious for PR validation\n\t// and local testing so it's not hindered by service availability\n\tconst connectionProps: AzureRemoteConnectionConfig | AzureLocalConnectionConfig = useAzure\n\t\t? {\n\t\t\t\ttenantId,\n\t\t\t\ttokenProvider: createAzureTokenProvider(id ?? \"foo\", name ?? \"bar\", scopes),\n\t\t\t\tendpoint: endPoint,\n\t\t\t\ttype: \"remote\",\n\t\t\t}\n\t\t: {\n\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user, scopes),\n\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\ttype: \"local\",\n\t\t\t};\n\tconst getLogger = (): ITelemetryBaseLogger | undefined => {\n\t\tconst testLogger = getTestLogger?.();\n\t\tif (!logger && !testLogger) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (logger && testLogger) {\n\t\t\treturn createMultiSinkLogger({ loggers: [logger, testLogger] });\n\t\t}\n\t\treturn logger ?? testLogger;\n\t};\n\n\tconst createLogger = createChildLogger({\n\t\tlogger: getLogger(),\n\t\tproperties: {\n\t\t\tall: {\n\t\t\t\tdriverType: useAzure ? r11sEndpointName : driver,\n\t\t\t\tdriverEndpointName: driver,\n\t\t\t},\n\t\t},\n\t});\n\n\tconst props: AzureClientPropsInternal = {\n\t\tconnection: connectionProps,\n\t\tlogger: createLogger,\n\t\tconfigProvider,\n\t\tcreateContainerRuntimeFactory,\n\t};\n\treturn new AzureClient(props);\n}\n\n/**\n * Copy of {@link createAzureClient} with legacy (LTS) AzureClient APIs.\n */\nexport function createAzureClientLegacy(\n\tuserID?: string,\n\tuserName?: string,\n\tlogger?: MockLogger,\n): AzureClientLegacy {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"frs-client-tenant\";\n\tconst user = {\n\t\tid: userID ?? uuid(),\n\t\tname: userName ?? uuid(),\n\t};\n\tconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure Azure Fluid Relay service endpoint is missing\");\n\t}\n\n\t// use AzureClient remote mode will run against live Azure Fluid Relay.\n\t// Default to running Tinylicious for PR validation\n\t// and local testing so it's not hindered by service availability\n\tconst connectionProps: AzureRemoteConnectionConfigLegacy | AzureLocalConnectionConfigLegacy =\n\t\tuseAzure\n\t\t\t? {\n\t\t\t\t\ttenantId,\n\t\t\t\t\ttokenProvider: createAzureTokenProvider(userID ?? \"foo\", userName ?? \"bar\"),\n\t\t\t\t\tendpoint: endPoint,\n\t\t\t\t\ttype: \"remote\",\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user),\n\t\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\t\ttype: \"local\",\n\t\t\t\t};\n\tconst getLogger = (): ITelemetryBaseLoggerLegacy | undefined => {\n\t\tconst testLogger = getTestLogger?.();\n\t\tif (!logger && !testLogger) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (logger && testLogger) {\n\t\t\treturn createMultiSinkLogger({ loggers: [logger, testLogger] });\n\t\t}\n\t\treturn logger ?? testLogger;\n\t};\n\treturn new AzureClientLegacy({\n\t\tconnection: connectionProps,\n\t\tlogger: getLogger(),\n\t});\n}\n\n/**\n * This function is used to create a container using any summary payload.\n * It is primary intended as a workaround to using the AzureClient, and\n * is only being used at the moment for ephemeral container E2E tests\n * since AzureClient does not currently support ephemeral containers.\n *\n * Usage of this function for anything other than ephemeral E2E tests is\n * not recommended.\n *\n * @param requestPayload - The summary payload used to create the container,\n * currently these are mainly fetched from ephemeralSummaryTrees.ts\n * @param userID - ID for the user creating the container\n * @param userName - Name for the user creating the container\n * @returns An AxiosResponse containing the container ID(response.data.id)\n */\nexport async function createContainerFromPayload(\n\trequestPayload: object,\n\tuserID?: string,\n\tuserName?: string,\n): Promise<AxiosResponse> {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"local\";\n\tconst user = {\n\t\tid: userID ?? uuid(),\n\t\tname: userName ?? uuid(),\n\t};\n\tconst endPoint = useAzure\n\t\t? (process.env.azure__fluid__relay__service__endpoint as string)\n\t\t: \"http://localhost:7071\";\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure Fluid Relay service endpoint is missing\");\n\t}\n\n\tconst tokenProvider = useAzure\n\t\t? createAzureTokenProvider(userID ?? \"foo\", userName ?? \"bar\")\n\t\t: new InsecureTokenProvider(\"fooBar\", user);\n\tconst ordererToken = await tokenProvider.fetchOrdererToken(tenantId, undefined, false);\n\n\tconst headers = {\n\t\t\"Authorization\": `Basic ${ordererToken.jwt}`,\n\t\t\"Content-Type\": \"application/json\",\n\t};\n\n\tconst url = `/documents/${tenantId}`;\n\n\tconst options: AxiosRequestConfig = {\n\t\tbaseURL: endPoint,\n\t\tdata: requestPayload,\n\t\theaders,\n\t\tmaxBodyLength: 1048576000,\n\t\tmaxContentLength: 1048576000,\n\t\tmethod: \"POST\",\n\t\turl,\n\t};\n\n\ttry {\n\t\tconst response: AxiosResponse = await Axios(options);\n\n\t\tif (response.status === 201) {\n\t\t\tconsole.log(\"Container created successfully\");\n\t\t} else {\n\t\t\tthrow new Error(`Error creating container. Status code: ${response.status}`);\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\t\tif (response?.data === undefined || (useAzure && response?.data?.id === undefined)) {\n\t\t\tthrow new Error(`ID of the created container is undefined`);\n\t\t}\n\n\t\treturn response;\n\t} catch (error) {\n\t\tthrow new Error(`An error occurred: ${error}`);\n\t}\n}\n\n/**\n * This function takes an AxiosResponse returned by the createContainerFromPayload and returns the containerId.\n * A separate function is used for this, since the data path to the containerID is not always the same.\n * (Tinylicious has the ID stored at a different path than other services)\n *\n * @param response - A container creation response returned by createContainerFromPayload\n * @returns The ID of the container that was created by createContainerFromPayload\n */\nexport function getContainerIdFromPayloadResponse(response: AxiosResponse): string {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\treturn (useAzure ? response.data.id : response.data) as string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AzureClientFactory.js","sourceRoot":"","sources":["../../src/test/AzureClientF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,MAAM,IAAI,KAAK,CAAC,sBAAsB,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;AACF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAAC,QAAuB;IACxE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,OAAO,CAAC;IACtD,sEAAsE;IACtE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAW,CAAC;AAChE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tAzureClient,\n\ttype AzureLocalConnectionConfig,\n\ttype AzureRemoteConnectionConfig,\n\ttype ITelemetryBaseLogger,\n} from \"@fluidframework/azure-client\";\n// eslint-disable-next-line import-x/no-internal-modules -- TODO consider a test exposure to avoid /internal\nimport type { AzureClientPropsInternal } from \"@fluidframework/azure-client/internal\";\nimport {\n\tAzureClient as AzureClientLegacy,\n\ttype AzureLocalConnectionConfig as AzureLocalConnectionConfigLegacy,\n\ttype AzureRemoteConnectionConfig as AzureRemoteConnectionConfigLegacy,\n\ttype ITelemetryBaseLogger as ITelemetryBaseLoggerLegacy,\n} from \"@fluidframework/azure-client-legacy\";\nimport type { IRuntimeFactory } from \"@fluidframework/container-definitions/legacy\";\nimport type { IConfigProviderBase } from \"@fluidframework/core-interfaces\";\nimport { ScopeType } from \"@fluidframework/driver-definitions/legacy\";\nimport type { CompatibilityMode, ContainerSchema } from \"@fluidframework/fluid-static\";\nimport {\n\ttype MockLogger,\n\tcreateChildLogger,\n\tcreateMultiSinkLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\nimport { InsecureTokenProvider } from \"@fluidframework/test-runtime-utils/internal\";\nimport { default as Axios, type AxiosResponse, type AxiosRequestConfig } from \"axios\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { createAzureTokenProvider } from \"./AzureTokenFactory.js\";\n\n// eslint-disable-next-line unicorn/prefer-export-from\nexport { ScopeType };\n\n/**\n * This function will determine if local or remote mode is required (based on FLUID_CLIENT), and return a new\n * {@link AzureClient} instance based on the mode by setting the Connection config accordingly.\n */\nexport function createAzureClient(\n\tid?: string,\n\tname?: string,\n\tlogger?: MockLogger,\n\tconfigProvider?: IConfigProviderBase,\n\tscopes?: ScopeType[],\n\tcreateContainerRuntimeFactory?: ({\n\t\tschema,\n\t\tcompatibilityMode,\n\t}: {\n\t\tschema: ContainerSchema;\n\t\tcompatibilityMode: CompatibilityMode;\n\t}) => IRuntimeFactory,\n): AzureClient {\n\tconst args = process.argv.slice(2);\n\n\tconst driverIndex = args.indexOf(\"--driver\");\n\tconst r11sEndpointNameIndex = args.indexOf(\"--r11sEndpointName\");\n\n\t// Get values associated with the flags\n\tconst driver = driverIndex === -1 ? undefined : args[driverIndex + 1];\n\tconst r11sEndpointName =\n\t\tr11sEndpointNameIndex === -1 ? undefined : args[r11sEndpointNameIndex + 1];\n\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"frs-client-tenant\";\n\tconst user = {\n\t\tid: id ?? uuid(),\n\t\tname: name ?? uuid(),\n\t};\n\tconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure Fluid Relay service endpoint is missing\");\n\t}\n\n\t// use AzureClient remote mode will run against live Azure Fluid Relay.\n\t// Default to running Tinylicious for PR validation\n\t// and local testing so it's not hindered by service availability\n\tconst connectionProps: AzureRemoteConnectionConfig | AzureLocalConnectionConfig = useAzure\n\t\t? {\n\t\t\t\ttenantId,\n\t\t\t\ttokenProvider: createAzureTokenProvider(id ?? \"foo\", name ?? \"bar\", scopes),\n\t\t\t\tendpoint: endPoint,\n\t\t\t\ttype: \"remote\",\n\t\t\t}\n\t\t: {\n\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user, scopes),\n\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\ttype: \"local\",\n\t\t\t};\n\tconst getLogger = (): ITelemetryBaseLogger | undefined => {\n\t\tconst testLogger = getTestLogger?.();\n\t\tif (!logger && !testLogger) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (logger && testLogger) {\n\t\t\treturn createMultiSinkLogger({ loggers: [logger, testLogger] });\n\t\t}\n\t\treturn logger ?? testLogger;\n\t};\n\n\tconst createLogger = createChildLogger({\n\t\tlogger: getLogger(),\n\t\tproperties: {\n\t\t\tall: {\n\t\t\t\tdriverType: useAzure ? r11sEndpointName : driver,\n\t\t\t\tdriverEndpointName: driver,\n\t\t\t},\n\t\t},\n\t});\n\n\tconst props: AzureClientPropsInternal = {\n\t\tconnection: connectionProps,\n\t\tlogger: createLogger,\n\t\tconfigProvider,\n\t\tcreateContainerRuntimeFactory,\n\t};\n\treturn new AzureClient(props);\n}\n\n/**\n * Copy of {@link createAzureClient} with legacy (LTS) AzureClient APIs.\n */\nexport function createAzureClientLegacy(\n\tuserID?: string,\n\tuserName?: string,\n\tlogger?: MockLogger,\n): AzureClientLegacy {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"frs-client-tenant\";\n\tconst user = {\n\t\tid: userID ?? uuid(),\n\t\tname: userName ?? uuid(),\n\t};\n\tconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure Azure Fluid Relay service endpoint is missing\");\n\t}\n\n\t// use AzureClient remote mode will run against live Azure Fluid Relay.\n\t// Default to running Tinylicious for PR validation\n\t// and local testing so it's not hindered by service availability\n\tconst connectionProps: AzureRemoteConnectionConfigLegacy | AzureLocalConnectionConfigLegacy =\n\t\tuseAzure\n\t\t\t? {\n\t\t\t\t\ttenantId,\n\t\t\t\t\ttokenProvider: createAzureTokenProvider(userID ?? \"foo\", userName ?? \"bar\"),\n\t\t\t\t\tendpoint: endPoint,\n\t\t\t\t\ttype: \"remote\",\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user),\n\t\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\t\ttype: \"local\",\n\t\t\t\t};\n\tconst getLogger = (): ITelemetryBaseLoggerLegacy | undefined => {\n\t\tconst testLogger = getTestLogger?.();\n\t\tif (!logger && !testLogger) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (logger && testLogger) {\n\t\t\treturn createMultiSinkLogger({ loggers: [logger, testLogger] });\n\t\t}\n\t\treturn logger ?? testLogger;\n\t};\n\treturn new AzureClientLegacy({\n\t\tconnection: connectionProps,\n\t\tlogger: getLogger(),\n\t});\n}\n\n/**\n * This function is used to create a container using any summary payload.\n * It is primary intended as a workaround to using the AzureClient, and\n * is only being used at the moment for ephemeral container E2E tests\n * since AzureClient does not currently support ephemeral containers.\n *\n * Usage of this function for anything other than ephemeral E2E tests is\n * not recommended.\n *\n * @param requestPayload - The summary payload used to create the container,\n * currently these are mainly fetched from ephemeralSummaryTrees.ts\n * @param userID - ID for the user creating the container\n * @param userName - Name for the user creating the container\n * @returns An AxiosResponse containing the container ID(response.data.id)\n */\nexport async function createContainerFromPayload(\n\trequestPayload: object,\n\tuserID?: string,\n\tuserName?: string,\n): Promise<AxiosResponse> {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"local\";\n\tconst user = {\n\t\tid: userID ?? uuid(),\n\t\tname: userName ?? uuid(),\n\t};\n\tconst endPoint = useAzure\n\t\t? (process.env.azure__fluid__relay__service__endpoint as string)\n\t\t: \"http://localhost:7071\";\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure Fluid Relay service endpoint is missing\");\n\t}\n\n\tconst tokenProvider = useAzure\n\t\t? createAzureTokenProvider(userID ?? \"foo\", userName ?? \"bar\")\n\t\t: new InsecureTokenProvider(\"fooBar\", user);\n\tconst ordererToken = await tokenProvider.fetchOrdererToken(tenantId, undefined, false);\n\n\tconst headers = {\n\t\t\"Authorization\": `Basic ${ordererToken.jwt}`,\n\t\t\"Content-Type\": \"application/json\",\n\t};\n\n\tconst url = `/documents/${tenantId}`;\n\n\tconst options: AxiosRequestConfig = {\n\t\tbaseURL: endPoint,\n\t\tdata: requestPayload,\n\t\theaders,\n\t\tmaxBodyLength: 1048576000,\n\t\tmaxContentLength: 1048576000,\n\t\tmethod: \"POST\",\n\t\turl,\n\t};\n\n\ttry {\n\t\tconst response: AxiosResponse = await Axios(options);\n\n\t\tif (response.status === 201) {\n\t\t\tconsole.log(\"Container created successfully\");\n\t\t} else {\n\t\t\tthrow new Error(`Error creating container. Status code: ${response.status}`);\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\t\tif (response?.data === undefined || (useAzure && response?.data?.id === undefined)) {\n\t\t\tthrow new Error(`ID of the created container is undefined`);\n\t\t}\n\n\t\treturn response;\n\t} catch (error) {\n\t\tthrow new Error(`An error occurred: ${error}`);\n\t}\n}\n\n/**\n * This function takes an AxiosResponse returned by the createContainerFromPayload and returns the containerId.\n * A separate function is used for this, since the data path to the containerID is not always the same.\n * (Tinylicious has the ID stored at a different path than other services)\n *\n * @param response - A container creation response returned by createContainerFromPayload\n * @returns The ID of the container that was created by createContainerFromPayload\n */\nexport function getContainerIdFromPayloadResponse(response: AxiosResponse): string {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\treturn (useAzure ? response.data.id : response.data) as string;\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { EventEmitter } from "@fluid-internal/client-utils";
|
|
6
|
-
// eslint-disable-next-line import/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
6
|
+
// eslint-disable-next-line import-x/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
7
7
|
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
|
|
8
8
|
import { DataObject, DataObjectFactory, } from "@fluidframework/aqueduct/legacy";
|
|
9
9
|
import { SharedCounter } from "@fluidframework/counter/legacy";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestDataObject.js","sourceRoot":"","sources":["../../src/test/TestDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,
|
|
1
|
+
{"version":3,"file":"TestDataObject.js","sourceRoot":"","sources":["../../src/test/TestDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,4GAA4G;AAC5G,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EACN,UAAU,EACV,iBAAiB,GAEjB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,MAAM,mBAAoB,SAAQ,UAAU;IAQ3C,YAAY,KAAuB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;IACd,CAAC;;AATsB,wBAAI,GAAG,iCAAiC,CAAC;AAEzC,2BAAO,GAAG,IAAI,iBAAiB,CAAC;IACtD,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,IAAI,EAAE,mBAAmB;CACzB,CAAC,CAAC;AAOJ,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;AAGxE,MAAM,0BAA2B,SAAQ,UAAU;IAGlD;;OAEG;IACO,KAAK,CAAC,qBAAqB;QACpC,MAA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AM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;YAClC;;;eAGG;YACH,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;gBACvB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACnE,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,qDAAqD;IAE9C,QAAQ,CAAI,UAAkB,EAAE,QAA2B;QACjE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,SAAS,CACf,UAAkB,EAClB,QAA2B;QAE3B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,YAAY,CAAI,UAAkB,EAAE,OAAqB;QAC/D,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;;AArCsB,gCAAI,GAAG,0CAA0C,AAA7C,CAA8C;AAElD,mCAAO,GAAG,IAAI,iBAAiB,CAAC;IACtD,IAAI,EAAE,2BAA2B,CAAC,IAAI;IACtC,IAAI,EAAE,2BAA2B;CACjC,CAAC,AAH4B,CAG3B;AAmCJ,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC,2BAA2B,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SignalListener } from \"@fluid-experimental/data-objects\";\nimport { EventEmitter } from \"@fluid-internal/client-utils\";\n// eslint-disable-next-line import-x/no-internal-modules -- TODO consider a test exposure to avoid /internal\nimport { createDataObjectKind } from \"@fluidframework/aqueduct/internal\";\nimport {\n\tDataObject,\n\tDataObjectFactory,\n\ttype IDataObjectProps,\n} from \"@fluidframework/aqueduct/legacy\";\nimport type { IErrorEvent, IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { SharedCounter } from \"@fluidframework/counter/legacy\";\nimport type { Jsonable } from \"@fluidframework/datastore-definitions/legacy\";\nimport type { IInboundSignalMessage } from \"@fluidframework/runtime-definitions/legacy\";\n\nclass TestDataObjectClass extends DataObject {\n\tpublic static readonly Name = \"@fluid-example/test-data-object\";\n\n\tpublic static readonly factory = new DataObjectFactory({\n\t\ttype: TestDataObjectClass.Name,\n\t\tctor: TestDataObjectClass,\n\t});\n\n\tconstructor(props: IDataObjectProps) {\n\t\tsuper(props);\n\t}\n}\n\nexport const TestDataObject = createDataObjectKind(TestDataObjectClass);\nexport type TestDataObject = TestDataObjectClass;\n\nclass CounterTestDataObjectClass extends DataObject {\n\tprivate _counter: SharedCounter | undefined;\n\n\t/**\n\t * Do setup work here\n\t */\n\tprotected async initializingFirstTime(): Promise<void> {\n\t\tconst counter = SharedCounter.create(this.runtime);\n\t\tthis.root.set(\"counter-key\", counter.handle);\n\t}\n\n\tprotected async hasInitialized(): Promise<void> {\n\t\tconst counterHandle = this.root.get<IFluidHandle<SharedCounter>>(\"counter-key\");\n\t\tthis._counter = await counterHandle?.get();\n\t}\n\n\tpublic static readonly Name = \"@fluid-example/counter-test-data-object\";\n\n\tpublic static readonly factory = new DataObjectFactory({\n\t\ttype: CounterTestDataObjectClass.Name,\n\t\tctor: CounterTestDataObjectClass,\n\t\tsharedObjects: [SharedCounter.getFactory()],\n\t});\n\n\tpublic increment(): void {\n\t\tthis.counter.increment(1);\n\t}\n\n\tpublic get value(): number {\n\t\treturn this.counter.value;\n\t}\n\n\tprivate get counter(): SharedCounter {\n\t\tif (this._counter === undefined) {\n\t\t\tthrow new Error(\"SharedCounter not initialized\");\n\t\t}\n\t\treturn this._counter;\n\t}\n}\n\nexport const CounterTestDataObject = createDataObjectKind(CounterTestDataObjectClass);\nexport type CounterTestDataObject = CounterTestDataObjectClass;\n\n/**\n * Test implementation of experimental Signaler for testing scenarios working with signals.\n */\nexport class SignalerTestDataObjectClass extends DataObject<{ Events: IErrorEvent }> {\n\tprivate readonly emitter = new EventEmitter();\n\tpublic static readonly Name = \"@fluid-example/signaler-test-data-object\";\n\n\tpublic static readonly factory = new DataObjectFactory({\n\t\ttype: SignalerTestDataObjectClass.Name,\n\t\tctor: SignalerTestDataObjectClass,\n\t});\n\n\tprotected async hasInitialized(): Promise<void> {\n\t\tthis.runtime.on(\"signal\", (message: IInboundSignalMessage, local: boolean) => {\n\t\t\tconst clientId = message.clientId;\n\t\t\t/**\n\t\t\t * {@link Signaler} checks `runtime.connected` before allowing a signal to be sent/received.\n\t\t\t * However, that is never `true` for \"read\" clients, so we don't want to check it here.\n\t\t\t */\n\t\t\tif (clientId !== null) {\n\t\t\t\tthis.emitter.emit(message.type, clientId, local, message.content);\n\t\t\t}\n\t\t});\n\t}\n\n\t// ISignaler methods Note these are all passthroughs\n\n\tpublic onSignal<T>(signalName: string, listener: SignalListener<T>): SignalerTestDataObject {\n\t\tthis.emitter.on(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic offSignal<T>(\n\t\tsignalName: string,\n\t\tlistener: SignalListener<T>,\n\t): SignalerTestDataObject {\n\t\tthis.emitter.off(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic submitSignal<T>(signalName: string, payload?: Jsonable<T>): void {\n\t\tthis.runtime.submitSignal(signalName, payload);\n\t}\n}\n\nexport const SignalerTestDataObject = createDataObjectKind(SignalerTestDataObjectClass);\nexport type SignalerTestDataObject = SignalerTestDataObjectClass;\n"]}
|
|
@@ -6,7 +6,7 @@ import { strict as assert } from "node:assert";
|
|
|
6
6
|
import { AttachState } from "@fluidframework/container-definitions";
|
|
7
7
|
import { ConnectionState } from "@fluidframework/container-loader";
|
|
8
8
|
import { MessageType, } from "@fluidframework/driver-definitions/legacy";
|
|
9
|
-
// eslint-disable-next-line import/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
9
|
+
// eslint-disable-next-line import-x/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
10
10
|
import { isTreeContainerSchema } from "@fluidframework/fluid-static/internal";
|
|
11
11
|
import { createTreeContainerRuntimeFactory, } from "@fluidframework/fluid-static/legacy";
|
|
12
12
|
import { SharedMap } from "@fluidframework/map/legacy";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerCreate.spec.js","sourceRoot":"","sources":["../../src/test/containerCreate.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAI/C,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EACN,WAAW,GAEX,MAAM,2CAA2C,CAAC;AACnD,0GAA0G;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAEN,iCAAiC,GAEjC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EACN,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,cAAc,GAAG,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AC;IAEH,EAAE,CAAC,yCAAyC,EAAE,KAAK;QAClD,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG;YACd,cAAc,EAAE;gBACf,IAAI,EAAE,UAAU;gBAChB,GAAG,EAAE,SAAS;aACd;SACD,CAAC;QAEF,MAAM,MAAM,CAAC,OAAO,CACnB,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,EACnC,CAAC,KAAc,EAAE,EAAE;YAClB,MAAM,CAAC,KAAK,YAAY,UAAU,CAAC,CAAC;YACpC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC;YAC7D,OAAO,IAAI,CAAC;QACb,CAAC,EACD,mDAAmD,CACnD,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"node:assert\";\n\nimport type { AzureClient } from \"@fluidframework/azure-client\";\nimport type { AzureClient as AzureClientLegacy } from \"@fluidframework/azure-client-legacy\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { ConnectionState } from \"@fluidframework/container-loader\";\nimport type { ConfigTypes, IConfigProviderBase } from \"@fluidframework/core-interfaces\";\nimport {\n\tMessageType,\n\ttype ISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/legacy\";\n// eslint-disable-next-line import/no-internal-modules -- TODO consider a test exposure to avoid /internal\nimport { isTreeContainerSchema } from \"@fluidframework/fluid-static/internal\";\nimport {\n\ttype ContainerSchema,\n\tcreateTreeContainerRuntimeFactory,\n\ttype IFluidContainer,\n} from \"@fluidframework/fluid-static/legacy\";\nimport { SharedMap } from \"@fluidframework/map/legacy\";\nimport { SharedMap as SharedMapLegacy } from \"@fluidframework/map-legacy\";\nimport { MockLogger, UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { timeoutPromise } from \"@fluidframework/test-utils/internal\";\nimport { SharedTree } from \"@fluidframework/tree/legacy\";\nimport type { AxiosResponse } from \"axios\";\nimport type { SinonSandbox } from \"sinon\";\nimport { createSandbox } from \"sinon\";\n\nimport {\n\tcreateAzureClient,\n\tcreateAzureClientLegacy,\n\tcreateContainerFromPayload,\n\tgetContainerIdFromPayloadResponse,\n} from \"./AzureClientFactory.js\";\nimport * as ephemeralSummaryTrees from \"./ephemeralSummaryTrees.js\";\nimport { getTestMatrix, mapWait } from \"./utils.js\";\n\nconst configProvider = (settings: Record<string, ConfigTypes>): IConfigProviderBase => ({\n\tgetRawConfig: (name: string): ConfigTypes => settings[name],\n});\n\nconst testMatrix = getTestMatrix();\nfor (const testOpts of testMatrix) {\n\tdescribe(`Container create scenarios (${testOpts.variant})`, () => {\n\t\tconst connectTimeoutMs = 10_000;\n\t\tlet client: AzureClient;\n\t\tlet schema: ContainerSchema;\n\t\tconst isEphemeral: boolean = testOpts.options.isEphemeral;\n\n\t\tbeforeEach(\"createAzureClient\", () => {\n\t\t\tclient = createAzureClient();\n\t\t\tschema = {\n\t\t\t\tinitialObjects: {\n\t\t\t\t\tmap1: SharedMap,\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test when an Azure Client container is created,\n\t\t * it is initially detached.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(\"Created container is detached\", async function () {\n\t\t\t// We currently don't have API surface to create a detached ephemeral container.\n\t\t\t// Instead, ephemeral containers are created indirectly using the test util createContainerFromPayload().\n\t\t\t// Once we add ephemeral container API surface to AzureClient, we can enable this test for ephemeral too.\n\t\t\tif (isEphemeral) {\n\t\t\t\tthis.skip();\n\t\t\t}\n\t\t\tconst { container } = await client.createContainer(schema, \"2\");\n\t\t\tassert.strictEqual(\n\t\t\t\tcontainer.attachState,\n\t\t\t\tAttachState.Detached,\n\t\t\t\t\"Container should be detached\",\n\t\t\t);\n\n\t\t\t// Make sure we can attach.\n\t\t\tconst containerId = await container.attach();\n\t\t\tassert.strictEqual(typeof containerId, \"string\", \"Attach did not return a string ID\");\n\t\t});\n\n\t\t/**\n\t\t * Scenario: Test attaching a container.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(\"can attach a container\", async () => {\n\t\t\tlet containerId: string;\n\t\t\tlet container: IFluidContainer;\n\t\t\tif (isEphemeral) {\n\t\t\t\tconst containerResponse: AxiosResponse | undefined = await createContainerFromPayload(\n\t\t\t\t\tephemeralSummaryTrees.canAttachContainer,\n\t\t\t\t\t\"test-user-id-1\",\n\t\t\t\t\t\"test-user-name-1\",\n\t\t\t\t);\n\t\t\t\tcontainerId = getContainerIdFromPayloadResponse(containerResponse);\n\t\t\t\t({ container } = await client.getContainer(containerId, schema, \"2\"));\n\t\t\t} else {\n\t\t\t\t({ container } = await client.createContainer(schema, \"2\"));\n\t\t\t\tcontainerId = await container.attach();\n\t\t\t}\n\n\t\t\tif (container.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => container.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tassert.strictEqual(typeof containerId, \"string\", \"Attach did not return a string ID\");\n\t\t\tassert.strictEqual(\n\t\t\t\tcontainer.attachState,\n\t\t\t\tAttachState.Attached,\n\t\t\t\t\"Container is not attached after attach is called\",\n\t\t\t);\n\t\t});\n\n\t\t/**\n\t\t * Scenario: Test if attaching a container twice fails.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(\"cannot attach a container twice\", async () => {\n\t\t\tlet containerId: string;\n\t\t\tlet container: IFluidContainer;\n\t\t\tif (isEphemeral) {\n\t\t\t\tconst containerResponse: AxiosResponse | undefined = await createContainerFromPayload(\n\t\t\t\t\tephemeralSummaryTrees.cannotAttachContainerTwice,\n\t\t\t\t\t\"test-user-id-1\",\n\t\t\t\t\t\"test-user-name-1\",\n\t\t\t\t);\n\t\t\t\tcontainerId = getContainerIdFromPayloadResponse(containerResponse);\n\t\t\t\t({ container } = await client.getContainer(containerId, schema, \"2\"));\n\t\t\t} else {\n\t\t\t\t({ container } = await client.createContainer(schema, \"2\"));\n\t\t\t\tcontainerId = await container.attach();\n\t\t\t}\n\n\t\t\tif (container.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => container.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tassert.strictEqual(typeof containerId, \"string\", \"Attach did not return a string ID\");\n\t\t\tassert.strictEqual(\n\t\t\t\tcontainer.attachState,\n\t\t\t\tAttachState.Attached,\n\t\t\t\t\"Container is attached after attach is called\",\n\t\t\t);\n\t\t\tawait assert.rejects(\n\t\t\t\tcontainer.attach(),\n\t\t\t\t() => true,\n\t\t\t\t\"Container should not attach twice\",\n\t\t\t);\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if Azure Client can get an existing container.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(\"can retrieve existing Azure Fluid Relay container successfully\", async () => {\n\t\t\tlet containerId: string;\n\t\t\tlet newContainer: IFluidContainer;\n\t\t\tif (isEphemeral) {\n\t\t\t\tconst containerResponse: AxiosResponse | undefined = await createContainerFromPayload(\n\t\t\t\t\tephemeralSummaryTrees.retrieveExistingAFRContainer,\n\t\t\t\t\t\"test-user-id-1\",\n\t\t\t\t\t\"test-user-name-1\",\n\t\t\t\t);\n\t\t\t\tcontainerId = getContainerIdFromPayloadResponse(containerResponse);\n\t\t\t} else {\n\t\t\t\t({ container: newContainer } = await client.createContainer(schema, \"2\"));\n\t\t\t\tcontainerId = await newContainer.attach();\n\n\t\t\t\tif (newContainer.connectionState !== ConnectionState.Connected) {\n\t\t\t\t\tawait timeoutPromise((resolve) => newContainer.once(\"connected\", () => resolve()), {\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst resources = client.getContainer(containerId, schema, \"2\");\n\t\t\tawait assert.doesNotReject(\n\t\t\t\tresources,\n\t\t\t\t() => true,\n\t\t\t\t\"container cannot be retrieved from Azure Fluid Relay\",\n\t\t\t);\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if Azure Client can get a non-exiting container.\n\t\t *\n\t\t * Expected behavior: an error should be thrown when trying to get a non-existent container.\n\t\t *\n\t\t * Note: This test is currently skipped because it is failing when ran against tinylicious (azure-local-service).\n\t\t */\n\t\tit(\"cannot load improperly created container (cannot load a non-existent container)\", async () => {\n\t\t\tconst consoleErrorFn = console.error;\n\t\t\tconsole.error = (): void => {};\n\t\t\tconst containerAndServicesP = client.getContainer(\"containerConfig\", schema, \"2\");\n\n\t\t\tconst errorFn = (error: Error): boolean => {\n\t\t\t\tassert.notStrictEqual(error.message, undefined, \"Azure Client error is undefined\");\n\t\t\t\t// AFR gives R11s fetch error, T9s gives 0x8e4\n\t\t\t\tif (process.env.FLUID_CLIENT === \"azure\") {\n\t\t\t\t\tassert.strict(\n\t\t\t\t\t\t\"errorType\" in error &&\n\t\t\t\t\t\t\terror.errorType === \"fileNotFoundOrAccessDeniedError\" &&\n\t\t\t\t\t\t\t\"statusCode\" in error &&\n\t\t\t\t\t\t\terror.statusCode === 404,\n\t\t\t\t\t\t`Unexpected error: ${error.message}`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tassert.strict(error.message === \"0x8e4\", `Unexpected error: ${error.message}`);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\tawait assert.rejects(\n\t\t\t\tcontainerAndServicesP,\n\t\t\t\terrorFn,\n\t\t\t\t\"Azure Client can load a non-existent container\",\n\t\t\t);\n\t\t\t// eslint-disable-next-line require-atomic-updates\n\t\t\tconsole.error = consoleErrorFn;\n\t\t});\n\t});\n\n\tdescribe(`Container create with feature flags (${testOpts.variant})`, () => {\n\t\tlet client: AzureClient;\n\t\tlet schema: ContainerSchema;\n\t\tlet mockLogger: MockLogger;\n\t\tconst isEphemeral: boolean = testOpts.options.isEphemeral;\n\n\t\tbeforeEach(\"createAzureClient\", () => {\n\t\t\tmockLogger = new MockLogger();\n\t\t\tclient = createAzureClient(undefined, undefined, mockLogger, configProvider({}));\n\t\t\tschema = {\n\t\t\t\tinitialObjects: {\n\t\t\t\t\tmap1: SharedMap,\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\n\t\t/**\n\t\t * Scenario: Test if AzureClient can create a container with feature gates.\n\t\t *\n\t\t * Expected behavior: An error should not be thrown and the logger should have logged the enabled feature gates.\n\t\t */\n\t\tit(\"can create containers with feature gates\", async function () {\n\t\t\t// Ephemeral containers are currently not created with the AzureClient, and therefore do not\n\t\t\t// have an attached mockLogger which is needed for this test.\n\t\t\tif (isEphemeral) {\n\t\t\t\tthis.skip();\n\t\t\t}\n\t\t\tawait client.createContainer(schema, \"2\");\n\t\t\tconst event = mockLogger.events.find((e) => e.eventName.endsWith(\"ContainerLoadStats\"));\n\t\t\tassert(event !== undefined, \"ContainerLoadStats event should exist\");\n\t\t\tconst featureGates = event.featureGates as string;\n\t\t\tassert(featureGates.length > 0);\n\t\t});\n\t});\n\n\t/**\n\t * Testing scenarios for creating/loading containers with the legacy (LTS) version of AzureClient.\n\t */\n\tdescribe(`Container create with legacy version (${testOpts.variant})`, () => {\n\t\tconst connectTimeoutMs = 10_000;\n\t\tconst valueSetTimoutMs = 10_000;\n\t\tconst isEphemeral: boolean = testOpts.options.isEphemeral;\n\t\tlet clientCurrent: AzureClient;\n\t\tlet clientLegacy: AzureClientLegacy;\n\t\tconst schemaCurrent = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap1: SharedMap,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\n\t\tconst schemaLegacy = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap1: SharedMapLegacy,\n\t\t\t},\n\t\t};\n\n\t\tbeforeEach(\"createAzureClients\", function () {\n\t\t\tclientCurrent = createAzureClient();\n\t\t\tclientLegacy = createAzureClientLegacy();\n\t\t\tif (isEphemeral) {\n\t\t\t\t// TODO: Should we skip ephemeral tests for legacy clients?\n\t\t\t\tthis.skip();\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if a current AzureClient can get a container made by a legacy AzureClient.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tfor (const compatibilityMode of [\"1\", \"2\"] as const) {\n\t\t\tit(`Current AzureClient (mode: \"${compatibilityMode}\") can get container made by legacy AzureClient`, async () => {\n\t\t\t\tconst { container: containerLegacy } =\n\t\t\t\t\tawait clientLegacy.createContainer(schemaLegacy);\n\t\t\t\tconst containerId = await containerLegacy.attach();\n\n\t\t\t\tif (containerLegacy.connectionState !== ConnectionState.Connected) {\n\t\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t\t(resolve) => containerLegacy.once(\"connected\", () => resolve()),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\t\terrorMsg: \"containerLegacy connect() timeout\",\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst valueSetP = timeoutPromise(\n\t\t\t\t\t(resolve) => {\n\t\t\t\t\t\tconst confirmValueSet = (): void => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(containerLegacy.initialObjects.map1 as SharedMapLegacy).get(\"key\") === \"value\"\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcontainerLegacy.off(\"saved\", confirmValueSet);\n\t\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\tcontainerLegacy.on(\"saved\", confirmValueSet);\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: valueSetTimoutMs,\n\t\t\t\t\t\terrorMsg: \"valueSet timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\t(containerLegacy.initialObjects.map1 as SharedMapLegacy).set(\"key\", \"value\");\n\n\t\t\t\t// Await the value being saved, especially important if we dispose the legacy container.\n\t\t\t\tawait valueSetP;\n\n\t\t\t\tif (compatibilityMode === \"2\") {\n\t\t\t\t\t// We don't support interop between legacy containers and \"2\" mode, dispose the legacy\n\t\t\t\t\t// container to avoid this case.\n\t\t\t\t\tcontainerLegacy.dispose();\n\t\t\t\t}\n\n\t\t\t\tconst resources = clientCurrent.getContainer(\n\t\t\t\t\tcontainerId,\n\t\t\t\t\tschemaCurrent,\n\t\t\t\t\tcompatibilityMode,\n\t\t\t\t);\n\t\t\t\tawait assert.doesNotReject(resources, () => true, \"container could not be loaded\");\n\n\t\t\t\tconst { container: containerCurrent } = await resources;\n\n\t\t\t\tif (containerCurrent.connectionState !== ConnectionState.Connected) {\n\t\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t\t(resolve) => containerCurrent.once(\"connected\", () => resolve()),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\t\terrorMsg: \"containerCurrent connect() timeout\",\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst result = containerCurrent.initialObjects.map1.get<string>(\"key\");\n\t\t\t\tassert.strictEqual(result, \"value\", \"Value not found in copied container\");\n\t\t\t});\n\t\t}\n\t});\n\n\t/**\n\t * Testing creating/loading containers between the compatibility modes.\n\t */\n\tdescribe(`Container create with current version (${testOpts.variant})`, () => {\n\t\tconst connectTimeoutMs = 10_000;\n\t\tconst isEphemeral: boolean = testOpts.options.isEphemeral;\n\t\tlet clientCurrent1: AzureClient;\n\t\tlet clientCurrent2: AzureClient;\n\t\tlet clientLegacy: AzureClientLegacy;\n\t\tlet sandbox: SinonSandbox;\n\n\t\tconst schemaCurrent = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap1: SharedMap,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\n\t\tconst schemaLegacy = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap1: SharedMapLegacy,\n\t\t\t},\n\t\t};\n\n\t\tbefore(function () {\n\t\t\tsandbox = createSandbox();\n\t\t});\n\n\t\tbeforeEach(\"createAzureClients\", function () {\n\t\t\tclientCurrent1 = createAzureClient();\n\t\t\tclientCurrent2 = createAzureClient();\n\t\t\tclientLegacy = createAzureClientLegacy();\n\t\t\tif (isEphemeral) {\n\t\t\t\tthis.skip();\n\t\t\t}\n\t\t});\n\n\t\tafterEach(function () {\n\t\t\tsandbox.restore();\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if a legacy AzureClient can get a container made by the current AzureClient.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(`Legacy AzureClient can get container made by current AzureClient (mode: \"1\")`, async () => {\n\t\t\tconst { container: containerCurrent } = await clientCurrent1.createContainer(\n\t\t\t\tschemaCurrent,\n\t\t\t\t// Note: Only containers created in compatibility mode \"1\" may be loaded by legacy client.\n\t\t\t\t\"1\",\n\t\t\t);\n\t\t\tconst containerId = await containerCurrent.attach();\n\n\t\t\tif (containerCurrent.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcontainerCurrent.initialObjects.map1.set(\"key\", \"value\");\n\n\t\t\tconst resources = clientLegacy.getContainer(containerId, schemaLegacy);\n\t\t\tawait assert.doesNotReject(resources, () => true, \"container could not be loaded\");\n\n\t\t\tconst { container: containerLegacy } = await resources;\n\t\t\tif (containerLegacy.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => containerLegacy.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"containerLegacy connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst result = (containerLegacy.initialObjects.map1 as SharedMapLegacy).get<string>(\n\t\t\t\t\"key\",\n\t\t\t);\n\t\t\tassert.strictEqual(result, \"value\", \"Value not found in copied container\");\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if a current AzureClient in compatibility mode \"2\" can get a container made by the current AzureClient in mode \"1\".\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise be returned.\n\t\t */\n\t\tit(`Current AzureClient (mode: \"2\") can get container made by current AzureClient (mode: \"1\")`, async () => {\n\t\t\tconst { container: containerCurrent1 } = await clientCurrent1.createContainer(\n\t\t\t\tschemaCurrent,\n\t\t\t\t\"1\",\n\t\t\t);\n\t\t\tconst containerId = await containerCurrent1.attach();\n\n\t\t\tif (containerCurrent1.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent1.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent1 connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcontainerCurrent1.initialObjects.map1.set(\"key\", \"value\");\n\n\t\t\tconst resources = clientCurrent2.getContainer(containerId, schemaCurrent, \"2\");\n\t\t\tawait assert.doesNotReject(resources, () => true, \"container could not be loaded\");\n\n\t\t\tconst { container: containerCurrent2 } = await resources;\n\t\t\tif (containerCurrent2.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent2.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent2 connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst result = containerCurrent2.initialObjects.map1.get<string>(\"key\");\n\t\t\tassert.strictEqual(result, \"value\", \"Value not found in copied container\");\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if a current AzureClient in compatibility mode \"1\" can get a container made by the current AzureClient in mode \"2\".\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise be returned.\n\t\t */\n\t\tit(`Current AzureClient (mode: \"1\") can get container made by current AzureClient (mode: \"2\")`, async () => {\n\t\t\tconst { container: containerCurrent2 } = await clientCurrent2.createContainer(\n\t\t\t\tschemaCurrent,\n\t\t\t\t\"2\",\n\t\t\t);\n\t\t\tconst containerId = await containerCurrent2.attach();\n\n\t\t\tif (containerCurrent2.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent2.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent2 connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcontainerCurrent2.initialObjects.map1.set(\"key\", \"value\");\n\n\t\t\tconst resources = clientCurrent1.getContainer(containerId, schemaCurrent, \"1\");\n\t\t\tawait assert.doesNotReject(resources, () => true, \"container could not be loaded\");\n\n\t\t\tconst { container: containerCurrent1 } = await resources;\n\t\t\tif (containerCurrent1.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent1.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent1 connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst result = containerCurrent1.initialObjects.map1.get<string>(\"key\");\n\t\t\tassert.strictEqual(result, \"value\", \"Value not found in copied container\");\n\t\t});\n\n\t\tit(\"op grouping disabled as expected for 1.x clients\", async () => {\n\t\t\tconst { container: container1 } = await clientCurrent1.createContainer(\n\t\t\t\tschemaCurrent,\n\t\t\t\t\"1\",\n\t\t\t);\n\t\t\tconst containerId = await container1.attach();\n\n\t\t\tif (container1.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => container1.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst containerProcessSpy = sandbox.spy(\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\t\t\t\t(container1 as any).container,\n\t\t\t\t\"processRemoteMessage\",\n\t\t\t);\n\n\t\t\t// Explicitly force ops sent to be in the same batch\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t(container1 as any).container._runtime.orderSequentially(() => {\n\t\t\t\tconst map1 = container1.initialObjects.map1;\n\t\t\t\tmap1.set(\"1\", 1);\n\t\t\t\tmap1.set(\"2\", 2);\n\t\t\t\tmap1.set(\"3\", 3);\n\t\t\t});\n\n\t\t\tconst { container: containerLegacy } = await clientLegacy.getContainer(\n\t\t\t\tcontainerId,\n\t\t\t\tschemaLegacy,\n\t\t\t);\n\t\t\tif (containerLegacy.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => containerLegacy.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"containerLegacy connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst legacyMap = containerLegacy.initialObjects.map1 as SharedMapLegacy;\n\n\t\t\t// Verify ops are processed by legacy AzureClient\n\t\t\tassert.strictEqual(legacyMap.get(\"1\"), 1);\n\t\t\tassert.strictEqual(legacyMap.get(\"2\"), 2);\n\t\t\tassert.strictEqual(legacyMap.get(\"3\"), 3);\n\n\t\t\t// Inspect the incoming ops\n\t\t\tfor (const call of containerProcessSpy.getCalls()) {\n\t\t\t\tconst message = call.firstArg as ISequencedDocumentMessage;\n\t\t\t\tif (\n\t\t\t\t\tmessage.type === MessageType.Operation &&\n\t\t\t\t\t(message.contents as { type: string }).type === \"groupedBatch\"\n\t\t\t\t) {\n\t\t\t\t\tassert.fail(\"unexpected groupedBatch found\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfor (const compatibilityMode of [\"1\", \"2\"] as const) {\n\t\t\tit(`op grouping works as expected (compatibilityMode: ${compatibilityMode})`, async () => {\n\t\t\t\tconst { container: container1 } = await clientCurrent1.createContainer(\n\t\t\t\t\tschemaCurrent,\n\t\t\t\t\tcompatibilityMode,\n\t\t\t\t);\n\t\t\t\tconst containerId = await container1.attach();\n\n\t\t\t\tif (container1.connectionState !== ConnectionState.Connected) {\n\t\t\t\t\tawait timeoutPromise((resolve) => container1.once(\"connected\", () => resolve()), {\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst containerProcessSpy = sandbox.spy(\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\t\t\t\t\t(container1 as any).container,\n\t\t\t\t\t\"processRemoteMessage\",\n\t\t\t\t);\n\n\t\t\t\t// Explicitly force ops sent to be in the same batch\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t\t(container1 as any).container._runtime.orderSequentially(() => {\n\t\t\t\t\tconst map1 = container1.initialObjects.map1;\n\t\t\t\t\tmap1.set(\"1\", 1);\n\t\t\t\t\tmap1.set(\"2\", 2);\n\t\t\t\t\tmap1.set(\"3\", 3);\n\t\t\t\t});\n\n\t\t\t\tconst { container: container2 } = await clientCurrent1.getContainer(\n\t\t\t\t\tcontainerId,\n\t\t\t\t\tschemaCurrent,\n\t\t\t\t\tcompatibilityMode,\n\t\t\t\t);\n\t\t\t\tconst map2 = container2.initialObjects.map1;\n\n\t\t\t\t// Process ops coming from service\n\t\t\t\tassert.strictEqual(await mapWait(map2, \"1\"), 1);\n\t\t\t\tassert.strictEqual(await mapWait(map2, \"2\"), 2);\n\t\t\t\tassert.strictEqual(await mapWait(map2, \"3\"), 3);\n\n\t\t\t\t// Inspect the incoming ops\n\t\t\t\tlet groupedBatchCount = 0;\n\t\t\t\tfor (const call of containerProcessSpy.getCalls()) {\n\t\t\t\t\tconst message = call.firstArg as ISequencedDocumentMessage;\n\t\t\t\t\tif (\n\t\t\t\t\t\tmessage.type === MessageType.Operation &&\n\t\t\t\t\t\ttypeof message.contents === \"string\" &&\n\t\t\t\t\t\t(JSON.parse(message.contents) as { type?: unknown }).type === \"groupedBatch\"\n\t\t\t\t\t) {\n\t\t\t\t\t\tgroupedBatchCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (compatibilityMode === \"1\") {\n\t\t\t\t\tassert.strictEqual(\n\t\t\t\t\t\tgroupedBatchCount,\n\t\t\t\t\t\t0,\n\t\t\t\t\t\t\"expect no op grouping in compatibilityMode 1\",\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tassert.strictEqual(\n\t\t\t\t\t\tgroupedBatchCount,\n\t\t\t\t\t\t1,\n\t\t\t\t\t\t\"expect op grouping in compatibilityMode 2\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Testing creating/loading containers with a tree-based root data object.\n */\ndescribe(\"Container create in tree-only mode\", () => {\n\tconst invalidSchemaErrorMessage =\n\t\t\"Tree-only mode requires exactly 1 SharedTree in initialObjects.\";\n\tfunction createClient(): AzureClient {\n\t\treturn createAzureClient(\n\t\t\tundefined,\n\t\t\tundefined,\n\t\t\tundefined,\n\t\t\tundefined,\n\t\t\tundefined,\n\t\t\t({ schema, compatibilityMode }) => {\n\t\t\t\tif (!isTreeContainerSchema(schema)) {\n\t\t\t\t\tthrow new UsageError(invalidSchemaErrorMessage);\n\t\t\t\t}\n\t\t\t\treturn createTreeContainerRuntimeFactory({ schema, compatibilityMode });\n\t\t\t},\n\t\t);\n\t}\n\tit(\"can create tree-based container\", async function () {\n\t\tconst client = createClient();\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\ttree: SharedTree,\n\t\t\t},\n\t\t};\n\t\tconst { container } = await client.createContainer(schema, \"2\");\n\n\t\tassert(SharedTree.is(container.initialObjects.tree));\n\t});\n\n\tit(\"throws if invalid schema is encountered\", async function () {\n\t\tconst client = createClient();\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\ttree: SharedTree,\n\t\t\t\tmap: SharedMap,\n\t\t\t},\n\t\t};\n\n\t\tawait assert.rejects(\n\t\t\tclient.createContainer(schema, \"2\"),\n\t\t\t(error: unknown) => {\n\t\t\t\tassert(error instanceof UsageError);\n\t\t\t\tassert.strictEqual(error.message, invalidSchemaErrorMessage);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\t\"Expected an error to be thrown for invalid schema\",\n\t\t);\n\t});\n});\n"]}
|
|
1
|
+
{"version":3,"file":"containerCreate.spec.js","sourceRoot":"","sources":["../../src/test/containerCreate.spec.ts"],"names":[],"mappings":"AAA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AK,YAAY,UAAU,CAAC,CAAC;YACpC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC;YAC7D,OAAO,IAAI,CAAC;QACb,CAAC,EACD,mDAAmD,CACnD,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"node:assert\";\n\nimport type { AzureClient } from \"@fluidframework/azure-client\";\nimport type { AzureClient as AzureClientLegacy } from \"@fluidframework/azure-client-legacy\";\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { ConnectionState } from \"@fluidframework/container-loader\";\nimport type { ConfigTypes, IConfigProviderBase } from \"@fluidframework/core-interfaces\";\nimport {\n\tMessageType,\n\ttype ISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/legacy\";\n// eslint-disable-next-line import-x/no-internal-modules -- TODO consider a test exposure to avoid /internal\nimport { isTreeContainerSchema } from \"@fluidframework/fluid-static/internal\";\nimport {\n\ttype ContainerSchema,\n\tcreateTreeContainerRuntimeFactory,\n\ttype IFluidContainer,\n} from \"@fluidframework/fluid-static/legacy\";\nimport { SharedMap } from \"@fluidframework/map/legacy\";\nimport { SharedMap as SharedMapLegacy } from \"@fluidframework/map-legacy\";\nimport { MockLogger, UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { timeoutPromise } from \"@fluidframework/test-utils/internal\";\nimport { SharedTree } from \"@fluidframework/tree/legacy\";\nimport type { AxiosResponse } from \"axios\";\nimport type { SinonSandbox } from \"sinon\";\nimport { createSandbox } from \"sinon\";\n\nimport {\n\tcreateAzureClient,\n\tcreateAzureClientLegacy,\n\tcreateContainerFromPayload,\n\tgetContainerIdFromPayloadResponse,\n} from \"./AzureClientFactory.js\";\nimport * as ephemeralSummaryTrees from \"./ephemeralSummaryTrees.js\";\nimport { getTestMatrix, mapWait } from \"./utils.js\";\n\nconst configProvider = (settings: Record<string, ConfigTypes>): IConfigProviderBase => ({\n\tgetRawConfig: (name: string): ConfigTypes => settings[name],\n});\n\nconst testMatrix = getTestMatrix();\nfor (const testOpts of testMatrix) {\n\tdescribe(`Container create scenarios (${testOpts.variant})`, () => {\n\t\tconst connectTimeoutMs = 10_000;\n\t\tlet client: AzureClient;\n\t\tlet schema: ContainerSchema;\n\t\tconst isEphemeral: boolean = testOpts.options.isEphemeral;\n\n\t\tbeforeEach(\"createAzureClient\", () => {\n\t\t\tclient = createAzureClient();\n\t\t\tschema = {\n\t\t\t\tinitialObjects: {\n\t\t\t\t\tmap1: SharedMap,\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test when an Azure Client container is created,\n\t\t * it is initially detached.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(\"Created container is detached\", async function () {\n\t\t\t// We currently don't have API surface to create a detached ephemeral container.\n\t\t\t// Instead, ephemeral containers are created indirectly using the test util createContainerFromPayload().\n\t\t\t// Once we add ephemeral container API surface to AzureClient, we can enable this test for ephemeral too.\n\t\t\tif (isEphemeral) {\n\t\t\t\tthis.skip();\n\t\t\t}\n\t\t\tconst { container } = await client.createContainer(schema, \"2\");\n\t\t\tassert.strictEqual(\n\t\t\t\tcontainer.attachState,\n\t\t\t\tAttachState.Detached,\n\t\t\t\t\"Container should be detached\",\n\t\t\t);\n\n\t\t\t// Make sure we can attach.\n\t\t\tconst containerId = await container.attach();\n\t\t\tassert.strictEqual(typeof containerId, \"string\", \"Attach did not return a string ID\");\n\t\t});\n\n\t\t/**\n\t\t * Scenario: Test attaching a container.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(\"can attach a container\", async () => {\n\t\t\tlet containerId: string;\n\t\t\tlet container: IFluidContainer;\n\t\t\tif (isEphemeral) {\n\t\t\t\tconst containerResponse: AxiosResponse | undefined = await createContainerFromPayload(\n\t\t\t\t\tephemeralSummaryTrees.canAttachContainer,\n\t\t\t\t\t\"test-user-id-1\",\n\t\t\t\t\t\"test-user-name-1\",\n\t\t\t\t);\n\t\t\t\tcontainerId = getContainerIdFromPayloadResponse(containerResponse);\n\t\t\t\t({ container } = await client.getContainer(containerId, schema, \"2\"));\n\t\t\t} else {\n\t\t\t\t({ container } = await client.createContainer(schema, \"2\"));\n\t\t\t\tcontainerId = await container.attach();\n\t\t\t}\n\n\t\t\tif (container.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => container.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tassert.strictEqual(typeof containerId, \"string\", \"Attach did not return a string ID\");\n\t\t\tassert.strictEqual(\n\t\t\t\tcontainer.attachState,\n\t\t\t\tAttachState.Attached,\n\t\t\t\t\"Container is not attached after attach is called\",\n\t\t\t);\n\t\t});\n\n\t\t/**\n\t\t * Scenario: Test if attaching a container twice fails.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(\"cannot attach a container twice\", async () => {\n\t\t\tlet containerId: string;\n\t\t\tlet container: IFluidContainer;\n\t\t\tif (isEphemeral) {\n\t\t\t\tconst containerResponse: AxiosResponse | undefined = await createContainerFromPayload(\n\t\t\t\t\tephemeralSummaryTrees.cannotAttachContainerTwice,\n\t\t\t\t\t\"test-user-id-1\",\n\t\t\t\t\t\"test-user-name-1\",\n\t\t\t\t);\n\t\t\t\tcontainerId = getContainerIdFromPayloadResponse(containerResponse);\n\t\t\t\t({ container } = await client.getContainer(containerId, schema, \"2\"));\n\t\t\t} else {\n\t\t\t\t({ container } = await client.createContainer(schema, \"2\"));\n\t\t\t\tcontainerId = await container.attach();\n\t\t\t}\n\n\t\t\tif (container.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => container.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tassert.strictEqual(typeof containerId, \"string\", \"Attach did not return a string ID\");\n\t\t\tassert.strictEqual(\n\t\t\t\tcontainer.attachState,\n\t\t\t\tAttachState.Attached,\n\t\t\t\t\"Container is attached after attach is called\",\n\t\t\t);\n\t\t\tawait assert.rejects(\n\t\t\t\tcontainer.attach(),\n\t\t\t\t() => true,\n\t\t\t\t\"Container should not attach twice\",\n\t\t\t);\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if Azure Client can get an existing container.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(\"can retrieve existing Azure Fluid Relay container successfully\", async () => {\n\t\t\tlet containerId: string;\n\t\t\tlet newContainer: IFluidContainer;\n\t\t\tif (isEphemeral) {\n\t\t\t\tconst containerResponse: AxiosResponse | undefined = await createContainerFromPayload(\n\t\t\t\t\tephemeralSummaryTrees.retrieveExistingAFRContainer,\n\t\t\t\t\t\"test-user-id-1\",\n\t\t\t\t\t\"test-user-name-1\",\n\t\t\t\t);\n\t\t\t\tcontainerId = getContainerIdFromPayloadResponse(containerResponse);\n\t\t\t} else {\n\t\t\t\t({ container: newContainer } = await client.createContainer(schema, \"2\"));\n\t\t\t\tcontainerId = await newContainer.attach();\n\n\t\t\t\tif (newContainer.connectionState !== ConnectionState.Connected) {\n\t\t\t\t\tawait timeoutPromise((resolve) => newContainer.once(\"connected\", () => resolve()), {\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst resources = client.getContainer(containerId, schema, \"2\");\n\t\t\tawait assert.doesNotReject(\n\t\t\t\tresources,\n\t\t\t\t() => true,\n\t\t\t\t\"container cannot be retrieved from Azure Fluid Relay\",\n\t\t\t);\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if Azure Client can get a non-exiting container.\n\t\t *\n\t\t * Expected behavior: an error should be thrown when trying to get a non-existent container.\n\t\t *\n\t\t * Note: This test is currently skipped because it is failing when ran against tinylicious (azure-local-service).\n\t\t */\n\t\tit(\"cannot load improperly created container (cannot load a non-existent container)\", async () => {\n\t\t\tconst consoleErrorFn = console.error;\n\t\t\tconsole.error = (): void => {};\n\t\t\tconst containerAndServicesP = client.getContainer(\"containerConfig\", schema, \"2\");\n\n\t\t\tconst errorFn = (error: Error): boolean => {\n\t\t\t\tassert.notStrictEqual(error.message, undefined, \"Azure Client error is undefined\");\n\t\t\t\t// AFR gives R11s fetch error, T9s gives 0x8e4\n\t\t\t\tif (process.env.FLUID_CLIENT === \"azure\") {\n\t\t\t\t\tassert.strict(\n\t\t\t\t\t\t\"errorType\" in error &&\n\t\t\t\t\t\t\terror.errorType === \"fileNotFoundOrAccessDeniedError\" &&\n\t\t\t\t\t\t\t\"statusCode\" in error &&\n\t\t\t\t\t\t\terror.statusCode === 404,\n\t\t\t\t\t\t`Unexpected error: ${error.message}`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tassert.strict(error.message === \"0x8e4\", `Unexpected error: ${error.message}`);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t};\n\n\t\t\tawait assert.rejects(\n\t\t\t\tcontainerAndServicesP,\n\t\t\t\terrorFn,\n\t\t\t\t\"Azure Client can load a non-existent container\",\n\t\t\t);\n\t\t\t// eslint-disable-next-line require-atomic-updates\n\t\t\tconsole.error = consoleErrorFn;\n\t\t});\n\t});\n\n\tdescribe(`Container create with feature flags (${testOpts.variant})`, () => {\n\t\tlet client: AzureClient;\n\t\tlet schema: ContainerSchema;\n\t\tlet mockLogger: MockLogger;\n\t\tconst isEphemeral: boolean = testOpts.options.isEphemeral;\n\n\t\tbeforeEach(\"createAzureClient\", () => {\n\t\t\tmockLogger = new MockLogger();\n\t\t\tclient = createAzureClient(undefined, undefined, mockLogger, configProvider({}));\n\t\t\tschema = {\n\t\t\t\tinitialObjects: {\n\t\t\t\t\tmap1: SharedMap,\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\n\t\t/**\n\t\t * Scenario: Test if AzureClient can create a container with feature gates.\n\t\t *\n\t\t * Expected behavior: An error should not be thrown and the logger should have logged the enabled feature gates.\n\t\t */\n\t\tit(\"can create containers with feature gates\", async function () {\n\t\t\t// Ephemeral containers are currently not created with the AzureClient, and therefore do not\n\t\t\t// have an attached mockLogger which is needed for this test.\n\t\t\tif (isEphemeral) {\n\t\t\t\tthis.skip();\n\t\t\t}\n\t\t\tawait client.createContainer(schema, \"2\");\n\t\t\tconst event = mockLogger.events.find((e) => e.eventName.endsWith(\"ContainerLoadStats\"));\n\t\t\tassert(event !== undefined, \"ContainerLoadStats event should exist\");\n\t\t\tconst featureGates = event.featureGates as string;\n\t\t\tassert(featureGates.length > 0);\n\t\t});\n\t});\n\n\t/**\n\t * Testing scenarios for creating/loading containers with the legacy (LTS) version of AzureClient.\n\t */\n\tdescribe(`Container create with legacy version (${testOpts.variant})`, () => {\n\t\tconst connectTimeoutMs = 10_000;\n\t\tconst valueSetTimoutMs = 10_000;\n\t\tconst isEphemeral: boolean = testOpts.options.isEphemeral;\n\t\tlet clientCurrent: AzureClient;\n\t\tlet clientLegacy: AzureClientLegacy;\n\t\tconst schemaCurrent = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap1: SharedMap,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\n\t\tconst schemaLegacy = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap1: SharedMapLegacy,\n\t\t\t},\n\t\t};\n\n\t\tbeforeEach(\"createAzureClients\", function () {\n\t\t\tclientCurrent = createAzureClient();\n\t\t\tclientLegacy = createAzureClientLegacy();\n\t\t\tif (isEphemeral) {\n\t\t\t\t// TODO: Should we skip ephemeral tests for legacy clients?\n\t\t\t\tthis.skip();\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if a current AzureClient can get a container made by a legacy AzureClient.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tfor (const compatibilityMode of [\"1\", \"2\"] as const) {\n\t\t\tit(`Current AzureClient (mode: \"${compatibilityMode}\") can get container made by legacy AzureClient`, async () => {\n\t\t\t\tconst { container: containerLegacy } =\n\t\t\t\t\tawait clientLegacy.createContainer(schemaLegacy);\n\t\t\t\tconst containerId = await containerLegacy.attach();\n\n\t\t\t\tif (containerLegacy.connectionState !== ConnectionState.Connected) {\n\t\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t\t(resolve) => containerLegacy.once(\"connected\", () => resolve()),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\t\terrorMsg: \"containerLegacy connect() timeout\",\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst valueSetP = timeoutPromise(\n\t\t\t\t\t(resolve) => {\n\t\t\t\t\t\tconst confirmValueSet = (): void => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(containerLegacy.initialObjects.map1 as SharedMapLegacy).get(\"key\") === \"value\"\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcontainerLegacy.off(\"saved\", confirmValueSet);\n\t\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\tcontainerLegacy.on(\"saved\", confirmValueSet);\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: valueSetTimoutMs,\n\t\t\t\t\t\terrorMsg: \"valueSet timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\t(containerLegacy.initialObjects.map1 as SharedMapLegacy).set(\"key\", \"value\");\n\n\t\t\t\t// Await the value being saved, especially important if we dispose the legacy container.\n\t\t\t\tawait valueSetP;\n\n\t\t\t\tif (compatibilityMode === \"2\") {\n\t\t\t\t\t// We don't support interop between legacy containers and \"2\" mode, dispose the legacy\n\t\t\t\t\t// container to avoid this case.\n\t\t\t\t\tcontainerLegacy.dispose();\n\t\t\t\t}\n\n\t\t\t\tconst resources = clientCurrent.getContainer(\n\t\t\t\t\tcontainerId,\n\t\t\t\t\tschemaCurrent,\n\t\t\t\t\tcompatibilityMode,\n\t\t\t\t);\n\t\t\t\tawait assert.doesNotReject(resources, () => true, \"container could not be loaded\");\n\n\t\t\t\tconst { container: containerCurrent } = await resources;\n\n\t\t\t\tif (containerCurrent.connectionState !== ConnectionState.Connected) {\n\t\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t\t(resolve) => containerCurrent.once(\"connected\", () => resolve()),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\t\terrorMsg: \"containerCurrent connect() timeout\",\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst result = containerCurrent.initialObjects.map1.get<string>(\"key\");\n\t\t\t\tassert.strictEqual(result, \"value\", \"Value not found in copied container\");\n\t\t\t});\n\t\t}\n\t});\n\n\t/**\n\t * Testing creating/loading containers between the compatibility modes.\n\t */\n\tdescribe(`Container create with current version (${testOpts.variant})`, () => {\n\t\tconst connectTimeoutMs = 10_000;\n\t\tconst isEphemeral: boolean = testOpts.options.isEphemeral;\n\t\tlet clientCurrent1: AzureClient;\n\t\tlet clientCurrent2: AzureClient;\n\t\tlet clientLegacy: AzureClientLegacy;\n\t\tlet sandbox: SinonSandbox;\n\n\t\tconst schemaCurrent = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap1: SharedMap,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\n\t\tconst schemaLegacy = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap1: SharedMapLegacy,\n\t\t\t},\n\t\t};\n\n\t\tbefore(function () {\n\t\t\tsandbox = createSandbox();\n\t\t});\n\n\t\tbeforeEach(\"createAzureClients\", function () {\n\t\t\tclientCurrent1 = createAzureClient();\n\t\t\tclientCurrent2 = createAzureClient();\n\t\t\tclientLegacy = createAzureClientLegacy();\n\t\t\tif (isEphemeral) {\n\t\t\t\tthis.skip();\n\t\t\t}\n\t\t});\n\n\t\tafterEach(function () {\n\t\t\tsandbox.restore();\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if a legacy AzureClient can get a container made by the current AzureClient.\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise\n\t\t * be returned.\n\t\t */\n\t\tit(`Legacy AzureClient can get container made by current AzureClient (mode: \"1\")`, async () => {\n\t\t\tconst { container: containerCurrent } = await clientCurrent1.createContainer(\n\t\t\t\tschemaCurrent,\n\t\t\t\t// Note: Only containers created in compatibility mode \"1\" may be loaded by legacy client.\n\t\t\t\t\"1\",\n\t\t\t);\n\t\t\tconst containerId = await containerCurrent.attach();\n\n\t\t\tif (containerCurrent.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcontainerCurrent.initialObjects.map1.set(\"key\", \"value\");\n\n\t\t\tconst resources = clientLegacy.getContainer(containerId, schemaLegacy);\n\t\t\tawait assert.doesNotReject(resources, () => true, \"container could not be loaded\");\n\n\t\t\tconst { container: containerLegacy } = await resources;\n\t\t\tif (containerLegacy.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => containerLegacy.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"containerLegacy connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst result = (containerLegacy.initialObjects.map1 as SharedMapLegacy).get<string>(\n\t\t\t\t\"key\",\n\t\t\t);\n\t\t\tassert.strictEqual(result, \"value\", \"Value not found in copied container\");\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if a current AzureClient in compatibility mode \"2\" can get a container made by the current AzureClient in mode \"1\".\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise be returned.\n\t\t */\n\t\tit(`Current AzureClient (mode: \"2\") can get container made by current AzureClient (mode: \"1\")`, async () => {\n\t\t\tconst { container: containerCurrent1 } = await clientCurrent1.createContainer(\n\t\t\t\tschemaCurrent,\n\t\t\t\t\"1\",\n\t\t\t);\n\t\t\tconst containerId = await containerCurrent1.attach();\n\n\t\t\tif (containerCurrent1.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent1.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent1 connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcontainerCurrent1.initialObjects.map1.set(\"key\", \"value\");\n\n\t\t\tconst resources = clientCurrent2.getContainer(containerId, schemaCurrent, \"2\");\n\t\t\tawait assert.doesNotReject(resources, () => true, \"container could not be loaded\");\n\n\t\t\tconst { container: containerCurrent2 } = await resources;\n\t\t\tif (containerCurrent2.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent2.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent2 connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst result = containerCurrent2.initialObjects.map1.get<string>(\"key\");\n\t\t\tassert.strictEqual(result, \"value\", \"Value not found in copied container\");\n\t\t});\n\n\t\t/**\n\t\t * Scenario: test if a current AzureClient in compatibility mode \"1\" can get a container made by the current AzureClient in mode \"2\".\n\t\t *\n\t\t * Expected behavior: an error should not be thrown nor should a rejected promise be returned.\n\t\t */\n\t\tit(`Current AzureClient (mode: \"1\") can get container made by current AzureClient (mode: \"2\")`, async () => {\n\t\t\tconst { container: containerCurrent2 } = await clientCurrent2.createContainer(\n\t\t\t\tschemaCurrent,\n\t\t\t\t\"2\",\n\t\t\t);\n\t\t\tconst containerId = await containerCurrent2.attach();\n\n\t\t\tif (containerCurrent2.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent2.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent2 connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcontainerCurrent2.initialObjects.map1.set(\"key\", \"value\");\n\n\t\t\tconst resources = clientCurrent1.getContainer(containerId, schemaCurrent, \"1\");\n\t\t\tawait assert.doesNotReject(resources, () => true, \"container could not be loaded\");\n\n\t\t\tconst { container: containerCurrent1 } = await resources;\n\t\t\tif (containerCurrent1.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise(\n\t\t\t\t\t(resolve) => containerCurrent1.once(\"connected\", () => resolve()),\n\t\t\t\t\t{\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"containerCurrent1 connect() timeout\",\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst result = containerCurrent1.initialObjects.map1.get<string>(\"key\");\n\t\t\tassert.strictEqual(result, \"value\", \"Value not found in copied container\");\n\t\t});\n\n\t\tit(\"op grouping disabled as expected for 1.x clients\", async () => {\n\t\t\tconst { container: container1 } = await clientCurrent1.createContainer(\n\t\t\t\tschemaCurrent,\n\t\t\t\t\"1\",\n\t\t\t);\n\t\t\tconst containerId = await container1.attach();\n\n\t\t\tif (container1.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => container1.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst containerProcessSpy = sandbox.spy(\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\t\t\t\t(container1 as any).container,\n\t\t\t\t\"processRemoteMessage\",\n\t\t\t);\n\n\t\t\t// Explicitly force ops sent to be in the same batch\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t(container1 as any).container._runtime.orderSequentially(() => {\n\t\t\t\tconst map1 = container1.initialObjects.map1;\n\t\t\t\tmap1.set(\"1\", 1);\n\t\t\t\tmap1.set(\"2\", 2);\n\t\t\t\tmap1.set(\"3\", 3);\n\t\t\t});\n\n\t\t\tconst { container: containerLegacy } = await clientLegacy.getContainer(\n\t\t\t\tcontainerId,\n\t\t\t\tschemaLegacy,\n\t\t\t);\n\t\t\tif (containerLegacy.connectionState !== ConnectionState.Connected) {\n\t\t\t\tawait timeoutPromise((resolve) => containerLegacy.once(\"connected\", () => resolve()), {\n\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\terrorMsg: \"containerLegacy connect() timeout\",\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst legacyMap = containerLegacy.initialObjects.map1 as SharedMapLegacy;\n\n\t\t\t// Verify ops are processed by legacy AzureClient\n\t\t\tassert.strictEqual(legacyMap.get(\"1\"), 1);\n\t\t\tassert.strictEqual(legacyMap.get(\"2\"), 2);\n\t\t\tassert.strictEqual(legacyMap.get(\"3\"), 3);\n\n\t\t\t// Inspect the incoming ops\n\t\t\tfor (const call of containerProcessSpy.getCalls()) {\n\t\t\t\tconst message = call.firstArg as ISequencedDocumentMessage;\n\t\t\t\tif (\n\t\t\t\t\tmessage.type === MessageType.Operation &&\n\t\t\t\t\t(message.contents as { type: string }).type === \"groupedBatch\"\n\t\t\t\t) {\n\t\t\t\t\tassert.fail(\"unexpected groupedBatch found\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfor (const compatibilityMode of [\"1\", \"2\"] as const) {\n\t\t\tit(`op grouping works as expected (compatibilityMode: ${compatibilityMode})`, async () => {\n\t\t\t\tconst { container: container1 } = await clientCurrent1.createContainer(\n\t\t\t\t\tschemaCurrent,\n\t\t\t\t\tcompatibilityMode,\n\t\t\t\t);\n\t\t\t\tconst containerId = await container1.attach();\n\n\t\t\t\tif (container1.connectionState !== ConnectionState.Connected) {\n\t\t\t\t\tawait timeoutPromise((resolve) => container1.once(\"connected\", () => resolve()), {\n\t\t\t\t\t\tdurationMs: connectTimeoutMs,\n\t\t\t\t\t\terrorMsg: \"container connect() timeout\",\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst containerProcessSpy = sandbox.spy(\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\t\t\t\t\t(container1 as any).container,\n\t\t\t\t\t\"processRemoteMessage\",\n\t\t\t\t);\n\n\t\t\t\t// Explicitly force ops sent to be in the same batch\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t\t(container1 as any).container._runtime.orderSequentially(() => {\n\t\t\t\t\tconst map1 = container1.initialObjects.map1;\n\t\t\t\t\tmap1.set(\"1\", 1);\n\t\t\t\t\tmap1.set(\"2\", 2);\n\t\t\t\t\tmap1.set(\"3\", 3);\n\t\t\t\t});\n\n\t\t\t\tconst { container: container2 } = await clientCurrent1.getContainer(\n\t\t\t\t\tcontainerId,\n\t\t\t\t\tschemaCurrent,\n\t\t\t\t\tcompatibilityMode,\n\t\t\t\t);\n\t\t\t\tconst map2 = container2.initialObjects.map1;\n\n\t\t\t\t// Process ops coming from service\n\t\t\t\tassert.strictEqual(await mapWait(map2, \"1\"), 1);\n\t\t\t\tassert.strictEqual(await mapWait(map2, \"2\"), 2);\n\t\t\t\tassert.strictEqual(await mapWait(map2, \"3\"), 3);\n\n\t\t\t\t// Inspect the incoming ops\n\t\t\t\tlet groupedBatchCount = 0;\n\t\t\t\tfor (const call of containerProcessSpy.getCalls()) {\n\t\t\t\t\tconst message = call.firstArg as ISequencedDocumentMessage;\n\t\t\t\t\tif (\n\t\t\t\t\t\tmessage.type === MessageType.Operation &&\n\t\t\t\t\t\ttypeof message.contents === \"string\" &&\n\t\t\t\t\t\t(JSON.parse(message.contents) as { type?: unknown }).type === \"groupedBatch\"\n\t\t\t\t\t) {\n\t\t\t\t\t\tgroupedBatchCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (compatibilityMode === \"1\") {\n\t\t\t\t\tassert.strictEqual(\n\t\t\t\t\t\tgroupedBatchCount,\n\t\t\t\t\t\t0,\n\t\t\t\t\t\t\"expect no op grouping in compatibilityMode 1\",\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tassert.strictEqual(\n\t\t\t\t\t\tgroupedBatchCount,\n\t\t\t\t\t\t1,\n\t\t\t\t\t\t\"expect op grouping in compatibilityMode 2\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\n/**\n * Testing creating/loading containers with a tree-based root data object.\n */\ndescribe(\"Container create in tree-only mode\", () => {\n\tconst invalidSchemaErrorMessage =\n\t\t\"Tree-only mode requires exactly 1 SharedTree in initialObjects.\";\n\tfunction createClient(): AzureClient {\n\t\treturn createAzureClient(\n\t\t\tundefined,\n\t\t\tundefined,\n\t\t\tundefined,\n\t\t\tundefined,\n\t\t\tundefined,\n\t\t\t({ schema, compatibilityMode }) => {\n\t\t\t\tif (!isTreeContainerSchema(schema)) {\n\t\t\t\t\tthrow new UsageError(invalidSchemaErrorMessage);\n\t\t\t\t}\n\t\t\t\treturn createTreeContainerRuntimeFactory({ schema, compatibilityMode });\n\t\t\t},\n\t\t);\n\t}\n\tit(\"can create tree-based container\", async function () {\n\t\tconst client = createClient();\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\ttree: SharedTree,\n\t\t\t},\n\t\t};\n\t\tconst { container } = await client.createContainer(schema, \"2\");\n\n\t\tassert(SharedTree.is(container.initialObjects.tree));\n\t});\n\n\tit(\"throws if invalid schema is encountered\", async function () {\n\t\tconst client = createClient();\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\ttree: SharedTree,\n\t\t\t\tmap: SharedMap,\n\t\t\t},\n\t\t};\n\n\t\tawait assert.rejects(\n\t\t\tclient.createContainer(schema, \"2\"),\n\t\t\t(error: unknown) => {\n\t\t\t\tassert(error instanceof UsageError);\n\t\t\t\tassert.strictEqual(error.message, invalidSchemaErrorMessage);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\t\"Expected an error to be thrown for invalid schema\",\n\t\t);\n\t});\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../../../src/test/multiprocess/messageTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// eslint-disable-next-line import/no-internal-modules\nimport type { JsonSerializable } from \"@fluidframework/core-interfaces/internal\";\nimport type { ScopeType } from \"@fluidframework/driver-definitions/legacy\";\nimport type { AttendeeId } from \"@fluidframework/presence/beta\";\n\nexport interface UserIdAndName {\n\tid: string;\n\tname: string;\n}\n\nexport interface EventEntry {\n\ttimestamp: number;\n\tagentId: string;\n\teventCategory: string;\n\teventName: string;\n\tdetails?: string;\n}\n\n/**\n * Message types sent from the orchestrator to the child processes\n */\nexport type MessageToChild =\n\t| ConnectCommand\n\t| DebugReportCommand\n\t| DisconnectSelfCommand\n\t| RegisterWorkspaceCommand\n\t| GetLatestValueCommand\n\t| GetLatestMapValueCommand\n\t| SetLatestValueCommand\n\t| SetLatestMapValueCommand\n\t| PingCommand;\n\n/**\n * Can be sent to check child responsiveness.\n * An {@link AcknowledgeEvent} should be expected in response.\n */\ninterface PingCommand {\n\tcommand: \"ping\";\n}\n\n/**\n * Instructs a child process to connect to a Fluid container.\n * A {@link ConnectedEvent} should be expected in response.\n */\nexport interface ConnectCommand {\n\tcommand: \"connect\";\n\tuser: UserIdAndName;\n\tscopes: ScopeType[];\n\tcreateScopes?: ScopeType[];\n\t/**\n\t * The ID of the Fluid container to connect to.\n\t * If not provided, a new Fluid container will be created.\n\t */\n\tcontainerId?: string;\n\tconnectTimeoutMs: number;\n}\n\n/**\n * Instructs a child process to report debug information.\n *\n * @privateRemarks\n * This can be expanded over time to include more options.\n */\ninterface DebugReportCommand {\n\tcommand: \"debugReport\";\n\t/**\n\t * Send event log entries.\n\t */\n\tsendEventLog?: true;\n\t/**\n\t * Send basic attendee statistics (like count of connected).\n\t */\n\treportAttendees?: true;\n}\n\n/**\n * Instructs a child process to disconnect from a Fluid container.\n * A {@link DisconnectedSelfEvent} should be expected in response.\n */\ninterface DisconnectSelfCommand {\n\tcommand: \"disconnectSelf\";\n}\n\n/**\n * Instructs a child process to register for state objects in a workspace given a workspaceId\n * A {@link WorkspaceRegisteredEvent} should be expected in response.\n */\ninterface RegisterWorkspaceCommand {\n\tcommand: \"registerWorkspace\";\n\tworkspaceId: string;\n\t/**\n\t * Register a Latest state for this workspace.\n\t */\n\tlatest?: true;\n\t/**\n\t * Register a LatestMap state for this workspace.\n\t */\n\tlatestMap?: true;\n}\n\n/**\n * Instructs a child process to set the latest value.\n * We then can wait for {@link LatestValueUpdatedEvent} from other clients to know when an update occurs that represents this change.\n * Note: The client doesn't guarantee that the update message is directly related to this set command.\n */\ninterface SetLatestValueCommand {\n\tcommand: \"setLatestValue\";\n\tworkspaceId: string;\n\tvalue: JsonSerializable<unknown>;\n}\n\n/**\n * Instructs a child process to set the latest map value.\n * We then can wait for {@link LatestMapValueUpdatedEvent} from other clients to know when an update occurs that represents this change.\n * Note: The client doesn't guarantee that the update message is directly related to this set command.\n */\ninterface SetLatestMapValueCommand {\n\tcommand: \"setLatestMapValue\";\n\tworkspaceId: string;\n\tkey: string;\n\tvalue: JsonSerializable<unknown>;\n}\n\n/**\n * Instructs a child process to get the latest value.\n * A {@link LatestValueGetResponseEvent} should be expected in response.\n */\ninterface GetLatestValueCommand {\n\tcommand: \"getLatestValue\";\n\tworkspaceId: string;\n\tattendeeId?: AttendeeId;\n}\n\n/**\n * Instructs a child process to get the latest map value.\n * A {@link LatestMapValueGetResponseEvent} should be expected in response.\n */\ninterface GetLatestMapValueCommand {\n\tcommand: \"getLatestMapValue\";\n\tworkspaceId: string;\n\tkey: string;\n\tattendeeId?: AttendeeId;\n}\n\n/**\n * Message types sent from the child processes to the orchestrator\n */\nexport type MessageFromChild =\n\t| AcknowledgeEvent\n\t| AttendeeConnectedEvent\n\t| AttendeeDisconnectedEvent\n\t| ConnectedEvent\n\t| DebugReportCompleteEvent\n\t| DisconnectedSelfEvent\n\t| ErrorEvent\n\t| LatestMapValueGetResponseEvent\n\t| LatestMapValueUpdatedEvent\n\t| LatestValueGetResponseEvent\n\t| LatestValueUpdatedEvent\n\t| WorkspaceRegisteredEvent;\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link PingCommand}.\n */\ninterface AcknowledgeEvent {\n\tevent: \"ack\";\n}\n\n/**\n * Sent arbitrarily to indicate a new attendee has connected.\n */\ninterface AttendeeConnectedEvent {\n\tevent: \"attendeeConnected\";\n\tattendeeId: AttendeeId;\n}\n\n/**\n * Sent arbitrarily to indicate an attendee has disconnected.\n */\ninterface AttendeeDisconnectedEvent {\n\tevent: \"attendeeDisconnected\";\n\tattendeeId: AttendeeId;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link ConnectCommand}.\n */\ninterface ConnectedEvent {\n\tevent: \"connected\";\n\tcontainerId: string;\n\tattendeeId: AttendeeId;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link DebugReportCommand}.\n */\ninterface DebugReportCompleteEvent {\n\tevent: \"debugReportComplete\";\n\tlog?: EventEntry[];\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link DisconnectSelfCommand}.\n */\ninterface DisconnectedSelfEvent {\n\tevent: \"disconnectedSelf\";\n\tattendeeId: AttendeeId;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to latest value update.\n */\nexport interface LatestValueUpdatedEvent {\n\tevent: \"latestValueUpdated\";\n\tworkspaceId: string;\n\tattendeeId: AttendeeId;\n\tvalue: unknown;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to latest map value update.\n */\nexport interface LatestMapValueUpdatedEvent {\n\tevent: \"latestMapValueUpdated\";\n\tworkspaceId: string;\n\tattendeeId: AttendeeId;\n\tkey: string;\n\tvalue: unknown;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link GetLatestValueCommand}.\n */\nexport interface LatestValueGetResponseEvent {\n\tevent: \"latestValueGetResponse\";\n\tworkspaceId: string;\n\tattendeeId: AttendeeId | undefined;\n\tvalue: unknown;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link GetLatestMapValueCommand}.\n */\nexport interface LatestMapValueGetResponseEvent {\n\tevent: \"latestMapValueGetResponse\";\n\tworkspaceId: string;\n\tattendeeId: AttendeeId | undefined;\n\tkey: string;\n\tvalue: unknown;\n}\n\n/**\n * Sent from the child process to acknowledge workspace registration.\n */\ninterface WorkspaceRegisteredEvent {\n\tevent: \"workspaceRegistered\";\n\tworkspaceId: string;\n\tlatest?: boolean;\n\tlatestMap?: boolean;\n}\n\n/**\n * Sent at any time to indicate an error.\n */\ninterface ErrorEvent {\n\tevent: \"error\";\n\terror: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../../../src/test/multiprocess/messageTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// eslint-disable-next-line import-x/no-internal-modules\nimport type { JsonSerializable } from \"@fluidframework/core-interfaces/internal\";\nimport type { ScopeType } from \"@fluidframework/driver-definitions/legacy\";\nimport type { AttendeeId } from \"@fluidframework/presence/beta\";\n\nexport interface UserIdAndName {\n\tid: string;\n\tname: string;\n}\n\nexport interface EventEntry {\n\ttimestamp: number;\n\tagentId: string;\n\teventCategory: string;\n\teventName: string;\n\tdetails?: string;\n}\n\n/**\n * Message types sent from the orchestrator to the child processes\n */\nexport type MessageToChild =\n\t| ConnectCommand\n\t| DebugReportCommand\n\t| DisconnectSelfCommand\n\t| RegisterWorkspaceCommand\n\t| GetLatestValueCommand\n\t| GetLatestMapValueCommand\n\t| SetLatestValueCommand\n\t| SetLatestMapValueCommand\n\t| PingCommand;\n\n/**\n * Can be sent to check child responsiveness.\n * An {@link AcknowledgeEvent} should be expected in response.\n */\ninterface PingCommand {\n\tcommand: \"ping\";\n}\n\n/**\n * Instructs a child process to connect to a Fluid container.\n * A {@link ConnectedEvent} should be expected in response.\n */\nexport interface ConnectCommand {\n\tcommand: \"connect\";\n\tuser: UserIdAndName;\n\tscopes: ScopeType[];\n\tcreateScopes?: ScopeType[];\n\t/**\n\t * The ID of the Fluid container to connect to.\n\t * If not provided, a new Fluid container will be created.\n\t */\n\tcontainerId?: string;\n\tconnectTimeoutMs: number;\n}\n\n/**\n * Instructs a child process to report debug information.\n *\n * @privateRemarks\n * This can be expanded over time to include more options.\n */\ninterface DebugReportCommand {\n\tcommand: \"debugReport\";\n\t/**\n\t * Send event log entries.\n\t */\n\tsendEventLog?: true;\n\t/**\n\t * Send basic attendee statistics (like count of connected).\n\t */\n\treportAttendees?: true;\n}\n\n/**\n * Instructs a child process to disconnect from a Fluid container.\n * A {@link DisconnectedSelfEvent} should be expected in response.\n */\ninterface DisconnectSelfCommand {\n\tcommand: \"disconnectSelf\";\n}\n\n/**\n * Instructs a child process to register for state objects in a workspace given a workspaceId\n * A {@link WorkspaceRegisteredEvent} should be expected in response.\n */\ninterface RegisterWorkspaceCommand {\n\tcommand: \"registerWorkspace\";\n\tworkspaceId: string;\n\t/**\n\t * Register a Latest state for this workspace.\n\t */\n\tlatest?: true;\n\t/**\n\t * Register a LatestMap state for this workspace.\n\t */\n\tlatestMap?: true;\n}\n\n/**\n * Instructs a child process to set the latest value.\n * We then can wait for {@link LatestValueUpdatedEvent} from other clients to know when an update occurs that represents this change.\n * Note: The client doesn't guarantee that the update message is directly related to this set command.\n */\ninterface SetLatestValueCommand {\n\tcommand: \"setLatestValue\";\n\tworkspaceId: string;\n\tvalue: JsonSerializable<unknown>;\n}\n\n/**\n * Instructs a child process to set the latest map value.\n * We then can wait for {@link LatestMapValueUpdatedEvent} from other clients to know when an update occurs that represents this change.\n * Note: The client doesn't guarantee that the update message is directly related to this set command.\n */\ninterface SetLatestMapValueCommand {\n\tcommand: \"setLatestMapValue\";\n\tworkspaceId: string;\n\tkey: string;\n\tvalue: JsonSerializable<unknown>;\n}\n\n/**\n * Instructs a child process to get the latest value.\n * A {@link LatestValueGetResponseEvent} should be expected in response.\n */\ninterface GetLatestValueCommand {\n\tcommand: \"getLatestValue\";\n\tworkspaceId: string;\n\tattendeeId?: AttendeeId;\n}\n\n/**\n * Instructs a child process to get the latest map value.\n * A {@link LatestMapValueGetResponseEvent} should be expected in response.\n */\ninterface GetLatestMapValueCommand {\n\tcommand: \"getLatestMapValue\";\n\tworkspaceId: string;\n\tkey: string;\n\tattendeeId?: AttendeeId;\n}\n\n/**\n * Message types sent from the child processes to the orchestrator\n */\nexport type MessageFromChild =\n\t| AcknowledgeEvent\n\t| AttendeeConnectedEvent\n\t| AttendeeDisconnectedEvent\n\t| ConnectedEvent\n\t| DebugReportCompleteEvent\n\t| DisconnectedSelfEvent\n\t| ErrorEvent\n\t| LatestMapValueGetResponseEvent\n\t| LatestMapValueUpdatedEvent\n\t| LatestValueGetResponseEvent\n\t| LatestValueUpdatedEvent\n\t| WorkspaceRegisteredEvent;\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link PingCommand}.\n */\ninterface AcknowledgeEvent {\n\tevent: \"ack\";\n}\n\n/**\n * Sent arbitrarily to indicate a new attendee has connected.\n */\ninterface AttendeeConnectedEvent {\n\tevent: \"attendeeConnected\";\n\tattendeeId: AttendeeId;\n}\n\n/**\n * Sent arbitrarily to indicate an attendee has disconnected.\n */\ninterface AttendeeDisconnectedEvent {\n\tevent: \"attendeeDisconnected\";\n\tattendeeId: AttendeeId;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link ConnectCommand}.\n */\ninterface ConnectedEvent {\n\tevent: \"connected\";\n\tcontainerId: string;\n\tattendeeId: AttendeeId;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link DebugReportCommand}.\n */\ninterface DebugReportCompleteEvent {\n\tevent: \"debugReportComplete\";\n\tlog?: EventEntry[];\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link DisconnectSelfCommand}.\n */\ninterface DisconnectedSelfEvent {\n\tevent: \"disconnectedSelf\";\n\tattendeeId: AttendeeId;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to latest value update.\n */\nexport interface LatestValueUpdatedEvent {\n\tevent: \"latestValueUpdated\";\n\tworkspaceId: string;\n\tattendeeId: AttendeeId;\n\tvalue: unknown;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to latest map value update.\n */\nexport interface LatestMapValueUpdatedEvent {\n\tevent: \"latestMapValueUpdated\";\n\tworkspaceId: string;\n\tattendeeId: AttendeeId;\n\tkey: string;\n\tvalue: unknown;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link GetLatestValueCommand}.\n */\nexport interface LatestValueGetResponseEvent {\n\tevent: \"latestValueGetResponse\";\n\tworkspaceId: string;\n\tattendeeId: AttendeeId | undefined;\n\tvalue: unknown;\n}\n\n/**\n * Sent from the child processes to the orchestrator in response to a {@link GetLatestMapValueCommand}.\n */\nexport interface LatestMapValueGetResponseEvent {\n\tevent: \"latestMapValueGetResponse\";\n\tworkspaceId: string;\n\tattendeeId: AttendeeId | undefined;\n\tkey: string;\n\tvalue: unknown;\n}\n\n/**\n * Sent from the child process to acknowledge workspace registration.\n */\ninterface WorkspaceRegisteredEvent {\n\tevent: \"workspaceRegistered\";\n\tworkspaceId: string;\n\tlatest?: boolean;\n\tlatestMap?: boolean;\n}\n\n/**\n * Sent at any time to indicate an error.\n */\ninterface ErrorEvent {\n\tevent: \"error\";\n\terror: string;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/azure-end-to-end-tests",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.72.0",
|
|
4
4
|
"description": "Azure client end to end tests",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -33,29 +33,29 @@
|
|
|
33
33
|
"temp-directory": "nyc/.nyc_output"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluid-experimental/data-objects": "~2.
|
|
37
|
-
"@fluid-internal/client-utils": "~2.
|
|
38
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
39
|
-
"@fluid-private/test-version-utils": "~2.
|
|
40
|
-
"@fluidframework/aqueduct": "~2.
|
|
41
|
-
"@fluidframework/azure-client": "~2.
|
|
36
|
+
"@fluid-experimental/data-objects": "~2.72.0",
|
|
37
|
+
"@fluid-internal/client-utils": "~2.72.0",
|
|
38
|
+
"@fluid-internal/mocha-test-setup": "~2.72.0",
|
|
39
|
+
"@fluid-private/test-version-utils": "~2.72.0",
|
|
40
|
+
"@fluidframework/aqueduct": "~2.72.0",
|
|
41
|
+
"@fluidframework/azure-client": "~2.72.0",
|
|
42
42
|
"@fluidframework/azure-client-legacy": "npm:@fluidframework/azure-client@^1.2.0",
|
|
43
|
-
"@fluidframework/container-definitions": "~2.
|
|
44
|
-
"@fluidframework/container-loader": "~2.
|
|
45
|
-
"@fluidframework/core-interfaces": "~2.
|
|
46
|
-
"@fluidframework/counter": "~2.
|
|
47
|
-
"@fluidframework/datastore-definitions": "~2.
|
|
48
|
-
"@fluidframework/fluid-static": "~2.
|
|
49
|
-
"@fluidframework/map": "~2.
|
|
43
|
+
"@fluidframework/container-definitions": "~2.72.0",
|
|
44
|
+
"@fluidframework/container-loader": "~2.72.0",
|
|
45
|
+
"@fluidframework/core-interfaces": "~2.72.0",
|
|
46
|
+
"@fluidframework/counter": "~2.72.0",
|
|
47
|
+
"@fluidframework/datastore-definitions": "~2.72.0",
|
|
48
|
+
"@fluidframework/fluid-static": "~2.72.0",
|
|
49
|
+
"@fluidframework/map": "~2.72.0",
|
|
50
50
|
"@fluidframework/map-legacy": "npm:@fluidframework/map@^1.4.0",
|
|
51
|
-
"@fluidframework/matrix": "~2.
|
|
52
|
-
"@fluidframework/presence": "~2.
|
|
53
|
-
"@fluidframework/runtime-definitions": "~2.
|
|
54
|
-
"@fluidframework/sequence": "~2.
|
|
55
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
56
|
-
"@fluidframework/test-runtime-utils": "~2.
|
|
57
|
-
"@fluidframework/test-utils": "~2.
|
|
58
|
-
"@fluidframework/tree": "~2.
|
|
51
|
+
"@fluidframework/matrix": "~2.72.0",
|
|
52
|
+
"@fluidframework/presence": "~2.72.0",
|
|
53
|
+
"@fluidframework/runtime-definitions": "~2.72.0",
|
|
54
|
+
"@fluidframework/sequence": "~2.72.0",
|
|
55
|
+
"@fluidframework/telemetry-utils": "~2.72.0",
|
|
56
|
+
"@fluidframework/test-runtime-utils": "~2.72.0",
|
|
57
|
+
"@fluidframework/test-utils": "~2.72.0",
|
|
58
|
+
"@fluidframework/tree": "~2.72.0",
|
|
59
59
|
"axios": "^1.8.4",
|
|
60
60
|
"cross-env": "^7.0.3",
|
|
61
61
|
"mocha": "^10.8.2",
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@biomejs/biome": "~1.9.3",
|
|
70
70
|
"@fluidframework/build-common": "^2.0.3",
|
|
71
|
-
"@fluidframework/build-tools": "^0.
|
|
72
|
-
"@fluidframework/driver-definitions": "~2.
|
|
73
|
-
"@fluidframework/eslint-config-fluid": "
|
|
71
|
+
"@fluidframework/build-tools": "^0.60.0",
|
|
72
|
+
"@fluidframework/driver-definitions": "~2.72.0",
|
|
73
|
+
"@fluidframework/eslint-config-fluid": "~2.72.0",
|
|
74
74
|
"@types/mocha": "^10.0.10",
|
|
75
75
|
"@types/nock": "^9.3.0",
|
|
76
76
|
"@types/node": "^18.19.0",
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type AzureRemoteConnectionConfig,
|
|
10
10
|
type ITelemetryBaseLogger,
|
|
11
11
|
} from "@fluidframework/azure-client";
|
|
12
|
-
// eslint-disable-next-line import/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
12
|
+
// eslint-disable-next-line import-x/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
13
13
|
import type { AzureClientPropsInternal } from "@fluidframework/azure-client/internal";
|
|
14
14
|
import {
|
|
15
15
|
AzureClient as AzureClientLegacy,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import type { SignalListener } from "@fluid-experimental/data-objects";
|
|
7
7
|
import { EventEmitter } from "@fluid-internal/client-utils";
|
|
8
|
-
// eslint-disable-next-line import/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
8
|
+
// eslint-disable-next-line import-x/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
9
9
|
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
|
|
10
10
|
import {
|
|
11
11
|
DataObject,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
MessageType,
|
|
15
15
|
type ISequencedDocumentMessage,
|
|
16
16
|
} from "@fluidframework/driver-definitions/legacy";
|
|
17
|
-
// eslint-disable-next-line import/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
17
|
+
// eslint-disable-next-line import-x/no-internal-modules -- TODO consider a test exposure to avoid /internal
|
|
18
18
|
import { isTreeContainerSchema } from "@fluidframework/fluid-static/internal";
|
|
19
19
|
import {
|
|
20
20
|
type ContainerSchema,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
// eslint-disable-next-line import/no-internal-modules
|
|
6
|
+
// eslint-disable-next-line import-x/no-internal-modules
|
|
7
7
|
import type { JsonSerializable } from "@fluidframework/core-interfaces/internal";
|
|
8
8
|
import type { ScopeType } from "@fluidframework/driver-definitions/legacy";
|
|
9
9
|
import type { AttendeeId } from "@fluidframework/presence/beta";
|