Skip to content

Commit

Permalink
Add e2e test to demo use of flush mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alpaix committed Aug 18, 2022
1 parent 70a5081 commit 04ea944
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/test/test-end-to-end-tests/src/test/messageSize.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { describeNoCompat, itExpects } from "@fluidframework/test-version-utils"
import { IContainer, IErrorBase } from "@fluidframework/container-definitions";
import { ConfigTypes, IConfigProviderBase } from "@fluidframework/telemetry-utils";
import { GenericError } from "@fluidframework/container-utils";
import { FlushMode } from "@fluidframework/runtime-definitions";

describeNoCompat("Message size", (getTestObjectProvider) => {
const mapId = "mapId";
Expand Down Expand Up @@ -139,4 +140,14 @@ describeNoCompat("Message size", (getTestObjectProvider) => {

assertMapValues(dataObject2map, messageCount, largeString);
});

it("Batched small ops pass when batch is larger than max op size", async () => {
await setupContainers({ ...testContainerConfig, runtimeOptions: { flushMode: FlushMode.Immediate } }, {});
const largeString = generateStringOfSize(500000);
const messageCount = 10;
setMapKeys(dataObject1map, messageCount, largeString);
await provider.ensureSynchronized();

assertMapValues(dataObject2map, messageCount, largeString);
});
});

0 comments on commit 04ea944

Please sign in to comment.