@fluidframework/fluid-telemetry 2.111.0 → 2.112.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/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Port for the Tinylicious server started by this package's "start:tinylicious:test" script.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Each package that runs Tinylicious in the concurrent CI test sweep must use a distinct port to avoid collisions, so
|
|
10
|
+
* this must stay in sync with the port used in the package.json test scripts.
|
|
11
|
+
*
|
|
12
|
+
* TODO: We should update the tinylicious test infra to dynamically allocate ports for each package to avoid hardcoding and potential collisions in the future.
|
|
13
|
+
* Our jest/puppeteer tests already do this via the `getTestPort` function in `test-tools`.
|
|
14
|
+
* We should do something similar for these real service tests.
|
|
15
|
+
*/
|
|
16
|
+
export const tinyliciousPort = 7074;
|
|
17
|
+
//# sourceMappingURL=TestConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TestConstants.js","sourceRoot":"","sources":["../../src/test/TestConstants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Port for the Tinylicious server started by this package's \"start:tinylicious:test\" script.\n *\n * @remarks\n * Each package that runs Tinylicious in the concurrent CI test sweep must use a distinct port to avoid collisions, so\n * this must stay in sync with the port used in the package.json test scripts.\n *\n * TODO: We should update the tinylicious test infra to dynamically allocate ports for each package to avoid hardcoding and potential collisions in the future.\n * Our jest/puppeteer tests already do this via the `getTestPort` function in `test-tools`.\n * We should do something similar for these real service tests.\n */\nexport const tinyliciousPort = 7074;\n"]}
|
|
@@ -9,6 +9,7 @@ import { expect } from "chai";
|
|
|
9
9
|
import { spy } from "sinon";
|
|
10
10
|
import { startTelemetry } from "../factory/index.js";
|
|
11
11
|
import { ContainerTelemetryEventNames, } from "../index.js";
|
|
12
|
+
import { tinyliciousPort } from "./TestConstants.js";
|
|
12
13
|
// This test suite creates an actual IFluidContainer and confirms events are fired with the expected names during the expected events
|
|
13
14
|
describe("container telemetry E2E", () => {
|
|
14
15
|
let schema;
|
|
@@ -22,7 +23,7 @@ describe("container telemetry E2E", () => {
|
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
before(() => {
|
|
25
|
-
tinyliciousClient = new TinyliciousClient({ connection: { port:
|
|
26
|
+
tinyliciousClient = new TinyliciousClient({ connection: { port: tinyliciousPort } });
|
|
26
27
|
schema = {
|
|
27
28
|
initialObjects: {
|
|
28
29
|
sharedTree1: SharedTree,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerTelemetryEndToEnd.spec.realsvc.js","sourceRoot":"","sources":["../../src/test/containerTelemetryEndToEnd.spec.realsvc.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACN,4BAA4B,GAM5B,MAAM,aAAa,CAAC;AAErB,qIAAqI;AAErI,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACxC,IAAI,MAAuB,CAAC;IAC5B,IAAI,iBAAoC,CA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,EAAE,MAAM,EAAE,EAAE;YACnB,4FAA4F;YAC5F,SAAS,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;gBAC9B,SAAS,CAAC,UAAU,EAAE,CAAC;YACxB,CAAC,CAAC,CAAC;YAEH,4FAA4F;YAC5F,SAAS,CAAC,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE;gBACjC,SAAS,CAAC,OAAO,EAAE,CAAC;YACrB,CAAC,CAAC,CAAC;YAEH,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE;gBAC7B,0GAA0G;gBAC1G,oEAAoE;gBACpE,MAAM,yBAAyB,GAAG,2BAA2B,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAE;qBAC1E,IAAI,CAAC,CAAC,CAA+B,CAAC;gBAExC,OAAO,CAAC;oBACP,wBAAwB,EAAE,yBAAyB;oBACnD,0BAA0B,EAAE;wBAC3B,SAAS,EAAE,4BAA4B,CAAC,QAAQ;wBAChD,WAAW;wBACX,mHAAmH;wBACnH,2FAA2F;wBAC3F,mBAAmB,EAAE,yBAAyB,CAAC,mBAAmB;qBAClE;iBACD,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;QACJ,CAAC,EACD;YACC,UAAU,EAAE,IAAI;YAChB,QAAQ,EACP,6EAA6E;SAC9E,CACD,CAAC;QAEF,MAAM,CAAC,0BAA0B,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC3E,0GAA0G;QAC1G,MAAM,CAAC,wBAAwB,CAAC,mBAAmB,CAAC;aAClD,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;aACjB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxB,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 type { ContainerSchema } from \"@fluidframework/fluid-static\";\nimport { timeoutPromise } from \"@fluidframework/test-utils/internal\";\nimport { TinyliciousClient } from \"@fluidframework/tinylicious-client/internal\";\nimport { SharedTree } from \"@fluidframework/tree/internal\";\nimport { expect } from \"chai\";\nimport type Sinon from \"sinon\";\nimport { spy } from \"sinon\";\n\nimport { startTelemetry } from \"../factory/index.js\";\nimport {\n\tContainerTelemetryEventNames,\n\ttype ContainerConnectedTelemetry,\n\ttype ContainerDisconnectedTelemetry,\n\ttype ContainerDisposedTelemetry,\n\ttype IFluidTelemetry,\n\ttype ITelemetryConsumer,\n} from \"../index.js\";\n\n// This test suite creates an actual IFluidContainer and confirms events are fired with the expected names during the expected events\n\ndescribe(\"container telemetry E2E\", () => {\n\tlet schema: ContainerSchema;\n\tlet tinyliciousClient: TinyliciousClient;\n\tlet telemetryConsumerConsumeSpy: Sinon.SinonSpy;\n\tlet testTelemetryConsumer: ITelemetryConsumer;\n\n\t// Simple test class that will be used as the telemetry consumer.\n\tclass TestTelemetryConsumer implements ITelemetryConsumer {\n\t\tpublic consume(event: IFluidTelemetry): void {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tbefore(() => {\n\t\ttinyliciousClient = new TinyliciousClient({ connection: { port: 7070 } });\n\t\tschema = {\n\t\t\tinitialObjects: {\n\t\t\t\tsharedTree1: SharedTree,\n\t\t\t},\n\t\t};\n\n\t\ttestTelemetryConsumer = new TestTelemetryConsumer();\n\t\ttelemetryConsumerConsumeSpy = spy(testTelemetryConsumer, \"consume\");\n\t});\n\n\tbeforeEach(() => {\n\t\t// We need to reset the telemetry consumer spy for each test so the trackEvent calls\n\t\t// from the last test don't bleed into the next one.\n\t\ttelemetryConsumerConsumeSpy.resetHistory();\n\t});\n\n\tit(\"IFluid container's 'connected' system event produces expected ContainerConnectedTelemetry using ITelemetryConsumer\", async () => {\n\t\tconst { container } = await tinyliciousClient.createContainer(schema, \"2\");\n\n\t\tconst containerId = await container.attach();\n\t\tstartTelemetry({\n\t\t\tcontainer,\n\t\t\tcontainerId,\n\t\t\tconsumers: [testTelemetryConsumer],\n\t\t});\n\n\t\t// We don't know exactly when the given container events that we're looking for will fire so we have to\n\t\t// wrap the container.on(...) event handler within a promise that will be awaited at the end of the test.\n\t\tconst { actualContainerTelemetry, expectedContainerTelemetry } = await timeoutPromise<{\n\t\t\tactualContainerTelemetry: ContainerConnectedTelemetry;\n\t\t\texpectedContainerTelemetry: ContainerConnectedTelemetry;\n\t\t}>(\n\t\t\t(resolve) => {\n\t\t\t\tcontainer.on(\"connected\", () => {\n\t\t\t\t\t// We are making an assumption here that the 'connected' event is the first and only event sent to the ITelemetryConsumer.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst containerTelemetryFromSpy = telemetryConsumerConsumeSpy.getCalls()[0]!\n\t\t\t\t\t\t.args[0] as ContainerConnectedTelemetry;\n\n\t\t\t\t\tresolve({\n\t\t\t\t\t\tactualContainerTelemetry: containerTelemetryFromSpy,\n\t\t\t\t\t\texpectedContainerTelemetry: {\n\t\t\t\t\t\t\teventName: ContainerTelemetryEventNames.CONNECTED,\n\t\t\t\t\t\t\tcontainerId,\n\t\t\t\t\t\t\t// containerInstanceId is a uniquely generated UUID by the fluid-telemetry's ContainerEventTelemetryProducer class.\n\t\t\t\t\t\t\t// We can't use the underlying container's id because it is not exposed by IFluidContainer.\n\t\t\t\t\t\t\tcontainerInstanceId: containerTelemetryFromSpy.containerInstanceId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t},\n\t\t\t{ durationMs: 5000, errorMsg: \"timeout while waiting for container 'connected' event\" },\n\t\t);\n\n\t\texpect(expectedContainerTelemetry).to.deep.equal(actualContainerTelemetry);\n\t\t// We won't know what the container containerInstanceId will be but we can still check that it is defined.\n\t\texpect(actualContainerTelemetry.containerInstanceId)\n\t\t\t.to.be.a(\"string\")\n\t\t\t.with.length.above(0);\n\t});\n\n\tit(\"IFluid container's 'disconnected' system event produces expected ContainerDisconnectedTelemetry using ITelemetryConsumer\", async () => {\n\t\tconst { container } = await tinyliciousClient.createContainer(schema, \"2\");\n\n\t\tconst containerId = await container.attach();\n\t\tstartTelemetry({\n\t\t\tcontainer,\n\t\t\tcontainerId,\n\t\t\tconsumers: [testTelemetryConsumer],\n\t\t});\n\n\t\t// We don't know exactly when the given container events that we're looking for will fire so we have to\n\t\t// wrap the container.on(...) event handler within a promise that will be awaited at the end of the test.\n\t\tconst { actualContainerTelemetry, expectedContainerTelemetry } = await timeoutPromise<{\n\t\t\tactualContainerTelemetry: ContainerDisconnectedTelemetry;\n\t\t\texpectedContainerTelemetry: ContainerDisconnectedTelemetry;\n\t\t}>(\n\t\t\t(resolve) => {\n\t\t\t\t// Event handler 1: As soon as the container connects, we're ready to initiate a disconnect.\n\t\t\t\tcontainer.on(\"connected\", () => {\n\t\t\t\t\tcontainer.disconnect();\n\t\t\t\t});\n\n\t\t\t\tcontainer.on(\"disconnected\", () => {\n\t\t\t\t\t// We are making an assumption here that the 'disconnected' event is the second sent to the ITelemetryConsumer.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst containerTelemetryFromSpy = telemetryConsumerConsumeSpy.getCalls()[1]!\n\t\t\t\t\t\t.args[0] as ContainerDisconnectedTelemetry;\n\n\t\t\t\t\tresolve({\n\t\t\t\t\t\tactualContainerTelemetry: containerTelemetryFromSpy,\n\t\t\t\t\t\texpectedContainerTelemetry: {\n\t\t\t\t\t\t\teventName: ContainerTelemetryEventNames.DISCONNECTED,\n\t\t\t\t\t\t\tcontainerId,\n\t\t\t\t\t\t\t// containerInstanceId is a uniquely generated UUID by the fluid-telemetry's ContainerEventTelemetryProducer class.\n\t\t\t\t\t\t\t// We can't use the underlying container's id because it is not exposed by IFluidContainer.\n\t\t\t\t\t\t\tcontainerInstanceId: containerTelemetryFromSpy.containerInstanceId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t},\n\t\t\t{\n\t\t\t\tdurationMs: 5000,\n\t\t\t\terrorMsg:\n\t\t\t\t\t\"timeout while waiting for container 'connected' and/or 'disconnected' event\",\n\t\t\t},\n\t\t);\n\n\t\texpect(expectedContainerTelemetry).to.deep.equal(actualContainerTelemetry);\n\t\t// We won't know what the container containerInstanceId will be but we can still check that it is defined.\n\t\texpect(actualContainerTelemetry.containerInstanceId)\n\t\t\t.to.be.a(\"string\")\n\t\t\t.with.length.above(0);\n\t});\n\n\tit(\"IFluid container's 'disposed' system event produces expected ContainerDisposedTelemetry using ITelemetryConsumer\", async () => {\n\t\tconst { container } = await tinyliciousClient.createContainer(schema, \"2\");\n\n\t\tconst containerId = await container.attach();\n\t\tstartTelemetry({\n\t\t\tcontainer,\n\t\t\tcontainerId,\n\t\t\tconsumers: [testTelemetryConsumer],\n\t\t});\n\n\t\t// We don't know exactly when the given container events that we're looking for will fire so we have to\n\t\t// wrap the container.on(...) event handler within a promise that will be awaited at the end of the test.\n\t\tconst { actualContainerTelemetry, expectedContainerTelemetry } = await timeoutPromise<{\n\t\t\tactualContainerTelemetry: ContainerDisposedTelemetry;\n\t\t\texpectedContainerTelemetry: ContainerDisposedTelemetry;\n\t\t}>(\n\t\t\t(resolve, reject) => {\n\t\t\t\t// Event handler 1: As soon as the container connects, we're ready to initiate a disconnect.\n\t\t\t\tcontainer.on(\"connected\", () => {\n\t\t\t\t\tcontainer.disconnect();\n\t\t\t\t});\n\n\t\t\t\t// Event handler 2: As soon as the container disconnects, we're ready to initiate a dispose.\n\t\t\t\tcontainer.on(\"disconnected\", () => {\n\t\t\t\t\tcontainer.dispose();\n\t\t\t\t});\n\n\t\t\t\tcontainer.on(\"disposed\", () => {\n\t\t\t\t\t// We are making an assumption here that the 'disposed' event is the third sent to the ITelemetryConsumer.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst containerTelemetryFromSpy = telemetryConsumerConsumeSpy.getCalls()[2]!\n\t\t\t\t\t\t.args[0] as ContainerDisposedTelemetry;\n\n\t\t\t\t\tresolve({\n\t\t\t\t\t\tactualContainerTelemetry: containerTelemetryFromSpy,\n\t\t\t\t\t\texpectedContainerTelemetry: {\n\t\t\t\t\t\t\teventName: ContainerTelemetryEventNames.DISPOSED,\n\t\t\t\t\t\t\tcontainerId,\n\t\t\t\t\t\t\t// containerInstanceId is a uniquely generated UUID by the fluid-telemetry's ContainerEventTelemetryProducer class.\n\t\t\t\t\t\t\t// We can't use the underlying container's id because it is not exposed by IFluidContainer.\n\t\t\t\t\t\t\tcontainerInstanceId: containerTelemetryFromSpy.containerInstanceId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t},\n\t\t\t{\n\t\t\t\tdurationMs: 5000,\n\t\t\t\terrorMsg:\n\t\t\t\t\t\"timeout while waiting for container 'connected' and/or 'disconnected' event\",\n\t\t\t},\n\t\t);\n\n\t\texpect(expectedContainerTelemetry).to.deep.equal(actualContainerTelemetry);\n\t\t// We won't know what the container containerInstanceId will be but we can still check that it is defined.\n\t\texpect(actualContainerTelemetry.containerInstanceId)\n\t\t\t.to.be.a(\"string\")\n\t\t\t.with.length.above(0);\n\t});\n});\n"]}
|
|
1
|
+
{"version":3,"file":"containerTelemetryEndToEnd.spec.realsvc.js","sourceRoot":"","sources":["../../src/test/containerTelemetryEndToEnd.spec.realsvc.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACN,4BAA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IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxB,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 type { ContainerSchema } from \"@fluidframework/fluid-static\";\nimport { timeoutPromise } from \"@fluidframework/test-utils/internal\";\nimport { TinyliciousClient } from \"@fluidframework/tinylicious-client/internal\";\nimport { SharedTree } from \"@fluidframework/tree/internal\";\nimport { expect } from \"chai\";\nimport type Sinon from \"sinon\";\nimport { spy } from \"sinon\";\n\nimport { startTelemetry } from \"../factory/index.js\";\nimport {\n\tContainerTelemetryEventNames,\n\ttype ContainerConnectedTelemetry,\n\ttype ContainerDisconnectedTelemetry,\n\ttype ContainerDisposedTelemetry,\n\ttype IFluidTelemetry,\n\ttype ITelemetryConsumer,\n} from \"../index.js\";\n\nimport { tinyliciousPort } from \"./TestConstants.js\";\n\n// This test suite creates an actual IFluidContainer and confirms events are fired with the expected names during the expected events\n\ndescribe(\"container telemetry E2E\", () => {\n\tlet schema: ContainerSchema;\n\tlet tinyliciousClient: TinyliciousClient;\n\tlet telemetryConsumerConsumeSpy: Sinon.SinonSpy;\n\tlet testTelemetryConsumer: ITelemetryConsumer;\n\n\t// Simple test class that will be used as the telemetry consumer.\n\tclass TestTelemetryConsumer implements ITelemetryConsumer {\n\t\tpublic consume(event: IFluidTelemetry): void {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tbefore(() => {\n\t\ttinyliciousClient = new TinyliciousClient({ connection: { port: tinyliciousPort } });\n\t\tschema = {\n\t\t\tinitialObjects: {\n\t\t\t\tsharedTree1: SharedTree,\n\t\t\t},\n\t\t};\n\n\t\ttestTelemetryConsumer = new TestTelemetryConsumer();\n\t\ttelemetryConsumerConsumeSpy = spy(testTelemetryConsumer, \"consume\");\n\t});\n\n\tbeforeEach(() => {\n\t\t// We need to reset the telemetry consumer spy for each test so the trackEvent calls\n\t\t// from the last test don't bleed into the next one.\n\t\ttelemetryConsumerConsumeSpy.resetHistory();\n\t});\n\n\tit(\"IFluid container's 'connected' system event produces expected ContainerConnectedTelemetry using ITelemetryConsumer\", async () => {\n\t\tconst { container } = await tinyliciousClient.createContainer(schema, \"2\");\n\n\t\tconst containerId = await container.attach();\n\t\tstartTelemetry({\n\t\t\tcontainer,\n\t\t\tcontainerId,\n\t\t\tconsumers: [testTelemetryConsumer],\n\t\t});\n\n\t\t// We don't know exactly when the given container events that we're looking for will fire so we have to\n\t\t// wrap the container.on(...) event handler within a promise that will be awaited at the end of the test.\n\t\tconst { actualContainerTelemetry, expectedContainerTelemetry } = await timeoutPromise<{\n\t\t\tactualContainerTelemetry: ContainerConnectedTelemetry;\n\t\t\texpectedContainerTelemetry: ContainerConnectedTelemetry;\n\t\t}>(\n\t\t\t(resolve) => {\n\t\t\t\tcontainer.on(\"connected\", () => {\n\t\t\t\t\t// We are making an assumption here that the 'connected' event is the first and only event sent to the ITelemetryConsumer.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst containerTelemetryFromSpy = telemetryConsumerConsumeSpy.getCalls()[0]!\n\t\t\t\t\t\t.args[0] as ContainerConnectedTelemetry;\n\n\t\t\t\t\tresolve({\n\t\t\t\t\t\tactualContainerTelemetry: containerTelemetryFromSpy,\n\t\t\t\t\t\texpectedContainerTelemetry: {\n\t\t\t\t\t\t\teventName: ContainerTelemetryEventNames.CONNECTED,\n\t\t\t\t\t\t\tcontainerId,\n\t\t\t\t\t\t\t// containerInstanceId is a uniquely generated UUID by the fluid-telemetry's ContainerEventTelemetryProducer class.\n\t\t\t\t\t\t\t// We can't use the underlying container's id because it is not exposed by IFluidContainer.\n\t\t\t\t\t\t\tcontainerInstanceId: containerTelemetryFromSpy.containerInstanceId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t},\n\t\t\t{ durationMs: 5000, errorMsg: \"timeout while waiting for container 'connected' event\" },\n\t\t);\n\n\t\texpect(expectedContainerTelemetry).to.deep.equal(actualContainerTelemetry);\n\t\t// We won't know what the container containerInstanceId will be but we can still check that it is defined.\n\t\texpect(actualContainerTelemetry.containerInstanceId)\n\t\t\t.to.be.a(\"string\")\n\t\t\t.with.length.above(0);\n\t});\n\n\tit(\"IFluid container's 'disconnected' system event produces expected ContainerDisconnectedTelemetry using ITelemetryConsumer\", async () => {\n\t\tconst { container } = await tinyliciousClient.createContainer(schema, \"2\");\n\n\t\tconst containerId = await container.attach();\n\t\tstartTelemetry({\n\t\t\tcontainer,\n\t\t\tcontainerId,\n\t\t\tconsumers: [testTelemetryConsumer],\n\t\t});\n\n\t\t// We don't know exactly when the given container events that we're looking for will fire so we have to\n\t\t// wrap the container.on(...) event handler within a promise that will be awaited at the end of the test.\n\t\tconst { actualContainerTelemetry, expectedContainerTelemetry } = await timeoutPromise<{\n\t\t\tactualContainerTelemetry: ContainerDisconnectedTelemetry;\n\t\t\texpectedContainerTelemetry: ContainerDisconnectedTelemetry;\n\t\t}>(\n\t\t\t(resolve) => {\n\t\t\t\t// Event handler 1: As soon as the container connects, we're ready to initiate a disconnect.\n\t\t\t\tcontainer.on(\"connected\", () => {\n\t\t\t\t\tcontainer.disconnect();\n\t\t\t\t});\n\n\t\t\t\tcontainer.on(\"disconnected\", () => {\n\t\t\t\t\t// We are making an assumption here that the 'disconnected' event is the second sent to the ITelemetryConsumer.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst containerTelemetryFromSpy = telemetryConsumerConsumeSpy.getCalls()[1]!\n\t\t\t\t\t\t.args[0] as ContainerDisconnectedTelemetry;\n\n\t\t\t\t\tresolve({\n\t\t\t\t\t\tactualContainerTelemetry: containerTelemetryFromSpy,\n\t\t\t\t\t\texpectedContainerTelemetry: {\n\t\t\t\t\t\t\teventName: ContainerTelemetryEventNames.DISCONNECTED,\n\t\t\t\t\t\t\tcontainerId,\n\t\t\t\t\t\t\t// containerInstanceId is a uniquely generated UUID by the fluid-telemetry's ContainerEventTelemetryProducer class.\n\t\t\t\t\t\t\t// We can't use the underlying container's id because it is not exposed by IFluidContainer.\n\t\t\t\t\t\t\tcontainerInstanceId: containerTelemetryFromSpy.containerInstanceId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t},\n\t\t\t{\n\t\t\t\tdurationMs: 5000,\n\t\t\t\terrorMsg:\n\t\t\t\t\t\"timeout while waiting for container 'connected' and/or 'disconnected' event\",\n\t\t\t},\n\t\t);\n\n\t\texpect(expectedContainerTelemetry).to.deep.equal(actualContainerTelemetry);\n\t\t// We won't know what the container containerInstanceId will be but we can still check that it is defined.\n\t\texpect(actualContainerTelemetry.containerInstanceId)\n\t\t\t.to.be.a(\"string\")\n\t\t\t.with.length.above(0);\n\t});\n\n\tit(\"IFluid container's 'disposed' system event produces expected ContainerDisposedTelemetry using ITelemetryConsumer\", async () => {\n\t\tconst { container } = await tinyliciousClient.createContainer(schema, \"2\");\n\n\t\tconst containerId = await container.attach();\n\t\tstartTelemetry({\n\t\t\tcontainer,\n\t\t\tcontainerId,\n\t\t\tconsumers: [testTelemetryConsumer],\n\t\t});\n\n\t\t// We don't know exactly when the given container events that we're looking for will fire so we have to\n\t\t// wrap the container.on(...) event handler within a promise that will be awaited at the end of the test.\n\t\tconst { actualContainerTelemetry, expectedContainerTelemetry } = await timeoutPromise<{\n\t\t\tactualContainerTelemetry: ContainerDisposedTelemetry;\n\t\t\texpectedContainerTelemetry: ContainerDisposedTelemetry;\n\t\t}>(\n\t\t\t(resolve, reject) => {\n\t\t\t\t// Event handler 1: As soon as the container connects, we're ready to initiate a disconnect.\n\t\t\t\tcontainer.on(\"connected\", () => {\n\t\t\t\t\tcontainer.disconnect();\n\t\t\t\t});\n\n\t\t\t\t// Event handler 2: As soon as the container disconnects, we're ready to initiate a dispose.\n\t\t\t\tcontainer.on(\"disconnected\", () => {\n\t\t\t\t\tcontainer.dispose();\n\t\t\t\t});\n\n\t\t\t\tcontainer.on(\"disposed\", () => {\n\t\t\t\t\t// We are making an assumption here that the 'disposed' event is the third sent to the ITelemetryConsumer.\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst containerTelemetryFromSpy = telemetryConsumerConsumeSpy.getCalls()[2]!\n\t\t\t\t\t\t.args[0] as ContainerDisposedTelemetry;\n\n\t\t\t\t\tresolve({\n\t\t\t\t\t\tactualContainerTelemetry: containerTelemetryFromSpy,\n\t\t\t\t\t\texpectedContainerTelemetry: {\n\t\t\t\t\t\t\teventName: ContainerTelemetryEventNames.DISPOSED,\n\t\t\t\t\t\t\tcontainerId,\n\t\t\t\t\t\t\t// containerInstanceId is a uniquely generated UUID by the fluid-telemetry's ContainerEventTelemetryProducer class.\n\t\t\t\t\t\t\t// We can't use the underlying container's id because it is not exposed by IFluidContainer.\n\t\t\t\t\t\t\tcontainerInstanceId: containerTelemetryFromSpy.containerInstanceId,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t},\n\t\t\t{\n\t\t\t\tdurationMs: 5000,\n\t\t\t\terrorMsg:\n\t\t\t\t\t\"timeout while waiting for container 'connected' and/or 'disconnected' event\",\n\t\t\t},\n\t\t);\n\n\t\texpect(expectedContainerTelemetry).to.deep.equal(actualContainerTelemetry);\n\t\t// We won't know what the container containerInstanceId will be but we can still check that it is defined.\n\t\texpect(actualContainerTelemetry.containerInstanceId)\n\t\t\t.to.be.a(\"string\")\n\t\t\t.with.length.above(0);\n\t});\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/fluid-telemetry",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.112.0",
|
|
4
4
|
"description": "Customer facing Fluid telemetry types and classes for both producing and consuming said telemetry",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -47,22 +47,22 @@
|
|
|
47
47
|
"main": "lib/index.js",
|
|
48
48
|
"types": "lib/index.d.ts",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/container-definitions": "~2.
|
|
51
|
-
"@fluidframework/container-loader": "~2.
|
|
52
|
-
"@fluidframework/fluid-static": "~2.
|
|
50
|
+
"@fluidframework/container-definitions": "~2.112.0",
|
|
51
|
+
"@fluidframework/container-loader": "~2.112.0",
|
|
52
|
+
"@fluidframework/fluid-static": "~2.112.0",
|
|
53
53
|
"@microsoft/applicationinsights-web": "^2.8.11",
|
|
54
54
|
"uuid": "^11.1.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
58
58
|
"@biomejs/biome": "~2.4.5",
|
|
59
|
-
"@fluid-internal/client-utils": "~2.
|
|
60
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
59
|
+
"@fluid-internal/client-utils": "~2.112.0",
|
|
60
|
+
"@fluid-internal/mocha-test-setup": "~2.112.0",
|
|
61
61
|
"@fluid-tools/build-cli": "^0.65.0",
|
|
62
62
|
"@fluidframework/build-tools": "^0.65.0",
|
|
63
|
-
"@fluidframework/test-utils": "~2.
|
|
64
|
-
"@fluidframework/tinylicious-client": "~2.
|
|
65
|
-
"@fluidframework/tree": "~2.
|
|
63
|
+
"@fluidframework/test-utils": "~2.112.0",
|
|
64
|
+
"@fluidframework/tinylicious-client": "~2.112.0",
|
|
65
|
+
"@fluidframework/tree": "~2.112.0",
|
|
66
66
|
"@microsoft/api-extractor": "7.58.1",
|
|
67
67
|
"@types/chai": "^4.0.0",
|
|
68
68
|
"@types/mocha": "^10.0.10",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"chai": "^4.5.0",
|
|
71
71
|
"concurrently": "^10.0.3",
|
|
72
72
|
"copyfiles": "^2.4.1",
|
|
73
|
+
"cross-env": "^10.1.0",
|
|
73
74
|
"eslint": "~9.39.1",
|
|
74
75
|
"jiti": "^2.6.1",
|
|
75
76
|
"mocha": "^11.7.5",
|
|
@@ -136,8 +137,8 @@
|
|
|
136
137
|
"format:biome": "biome check . --write",
|
|
137
138
|
"lint": "fluid-build . --task lint",
|
|
138
139
|
"lint:fix": "fluid-build . --task eslint:fix --task format",
|
|
139
|
-
"start:tinylicious:test": "tinylicious > tinylicious.log 2>&1",
|
|
140
|
-
"test": "start-server-and-test start:tinylicious:test
|
|
140
|
+
"start:tinylicious:test": "cross-env PORT=7074 tinylicious > tinylicious.log 2>&1",
|
|
141
|
+
"test": "start-server-and-test start:tinylicious:test 7074 test:mocha:all",
|
|
141
142
|
"test:mocha": "npm run test:mocha:esm:unit && echo skipping cjs to avoid overhead - npm run test:mocha:cjs:unit",
|
|
142
143
|
"test:mocha:all": "npm run test:mocha:esm:all && echo skipping cjs to avoid overhead - npm run test:mocha:cjs:all",
|
|
143
144
|
"test:mocha:cjs": "npm run test:mocha:cjs:unit && echo note: not running end-to-end tests",
|
|
@@ -150,7 +151,8 @@
|
|
|
150
151
|
"test:mocha:esm:end-to-end": "mocha \"lib/test/**/*.spec.realsvc.js\"",
|
|
151
152
|
"test:mocha:esm:unit": "mocha \"lib/test/**/*.spec.js\"",
|
|
152
153
|
"test:realsvc": "npm run test:realsvc:tinylicious",
|
|
153
|
-
"test:realsvc:tinylicious": "start-server-and-test start:tinylicious:test
|
|
154
|
+
"test:realsvc:tinylicious": "start-server-and-test start:tinylicious:test 7074 test:realsvc:tinylicious:run",
|
|
155
|
+
"test:realsvc:tinylicious:report": "npm run test:realsvc:tinylicious",
|
|
154
156
|
"test:realsvc:tinylicious:run": "npm run test:mocha:end-to-end",
|
|
155
157
|
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../../common/build/build-common/src/cjs/package.json ./dist"
|
|
156
158
|
}
|