Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flaky GC test where a data store may be deleted depending on how …
…long certain steps run (microsoft#19309) ## Bug The GC test "Trailing op [afterSweepTimeout] transitions data store from [ref -> unref] without deleting it" some times fails because the following error telemetry is logged - "fluid:telemetry:FluidDataStoreContext:GC_Deleted_DataStore_Unexpected_Delete". ## Root cause In the last summary in this test, a data store may be sweep ready depending on how much elapsed since the previous summary. The test used sweep timeout as 100 ms so if that much time has passed, a GC sweep op will be sent containing the id of the sweep ready data store. If this op is processed by the time the test completes, "fluid:telemetry:FluidDataStoreContext:GC_Deleted_DataStore_Unexpected_Delete" will be logged. Since the sweep timeout is low, it is possible that in certain cases, that times elapses between the last 2 summaries in the test resulting in the data store being deleted. ## Fix It's fine for the data store to be deleted in the scenario described above. However, the container that created the data store should be closed to emulate session expiry before sweep deletes it. The fix is to close this container before running the last summary. AB#6784
- Loading branch information