Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ describeCompat("Stamped v2 ops", "NoCompat", (getTestObjectProvider, apis) => {

const loader = provider.createLoader([[provider.defaultCodeDetails, runtimeFactory2]]);
const container2 = await loader.resolve({ url }, pendingState);
await provider.ensureSynchronized();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, I think it's possible that container2 would be missing state from container1 that predates the local pending state...? But maybe that's not possible, I think it only applies pending state once all ops up to the refSeq are processed. So... maybe it is ok.

What exactly were the "timing issues" - timeouts? I'm unsure how else removing an await could fix the flakiness. And I also feel like if this were timing out we should open a bug to investigate root cause there. ensureSynchronized hanging usually indicates a bug (e.g. around dirty/saved state tracking)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issues were that the container2 wasn't being saved properly and it was left hanging, causing the test to timeout when it was ran against FRS

// The following line causes a timeout when the test is ran against FRS.
// await provider.ensureSynchronized();
const testObj2 = (await container2.getEntryPoint()) as TestDataObject;
const shim2 = testObj2.getTree<MigrationShim>();
const legacyTree2 = shim2.currentTree as LegacySharedTree;
Expand Down Expand Up @@ -333,7 +334,8 @@ describeCompat("Stamped v2 ops", "NoCompat", (getTestObjectProvider, apis) => {

const loader = provider.createLoader([[provider.defaultCodeDetails, runtimeFactory2]]);
const container2 = await loader.resolve({ url }, pendingState);
await provider.ensureSynchronized();
// The following line causes a timeout when the test is ran against FRS.
// await provider.ensureSynchronized();
const testObj2 = (await container2.getEntryPoint()) as TestDataObject;
const shim2 = testObj2.getTree<MigrationShim>();
const newTree2 = shim2.currentTree as ITree;
Expand Down
Loading