@fluid-experimental/tree 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.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 +23 -0
- package/api-report/experimental-tree.api.md +2 -2
- package/dist/ChangeCompression.d.ts +2 -2
- package/dist/ChangeCompression.d.ts.map +1 -1
- package/dist/ChangeCompression.js +1 -1
- package/dist/ChangeCompression.js.map +1 -1
- package/dist/ChangeTypes.d.ts +1 -1
- package/dist/ChangeTypes.d.ts.map +1 -1
- package/dist/ChangeTypes.js +4 -4
- package/dist/ChangeTypes.js.map +1 -1
- package/dist/Checkout.d.ts +3 -3
- package/dist/Checkout.d.ts.map +1 -1
- package/dist/Checkout.js +17 -17
- package/dist/Checkout.js.map +1 -1
- package/dist/EditLog.d.ts +1 -1
- package/dist/EditLog.d.ts.map +1 -1
- package/dist/EditLog.js +9 -9
- package/dist/EditLog.js.map +1 -1
- package/dist/EditUtilities.d.ts +3 -3
- package/dist/EditUtilities.d.ts.map +1 -1
- package/dist/EditUtilities.js +6 -6
- package/dist/EditUtilities.js.map +1 -1
- package/dist/Forest.d.ts.map +1 -1
- package/dist/Forest.js +23 -23
- package/dist/Forest.js.map +1 -1
- package/dist/HistoryEditFactory.d.ts +1 -1
- package/dist/HistoryEditFactory.d.ts.map +1 -1
- package/dist/HistoryEditFactory.js +7 -7
- package/dist/HistoryEditFactory.js.map +1 -1
- package/dist/IdConversion.d.ts.map +1 -1
- package/dist/IdConversion.js.map +1 -1
- package/dist/LogViewer.d.ts +2 -2
- package/dist/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer.js +7 -7
- package/dist/LogViewer.js.map +1 -1
- package/dist/MergeHealth.d.ts.map +1 -1
- package/dist/MergeHealth.js +1 -1
- package/dist/MergeHealth.js.map +1 -1
- package/dist/NodeIdUtilities.d.ts +1 -1
- package/dist/NodeIdUtilities.d.ts.map +1 -1
- package/dist/NodeIdUtilities.js +1 -1
- package/dist/NodeIdUtilities.js.map +1 -1
- package/dist/PayloadUtilities.d.ts.map +1 -1
- package/dist/PayloadUtilities.js +2 -2
- package/dist/PayloadUtilities.js.map +1 -1
- package/dist/ReconciliationPath.d.ts +1 -1
- package/dist/ReconciliationPath.d.ts.map +1 -1
- package/dist/ReconciliationPath.js.map +1 -1
- package/dist/RevisionValueCache.d.ts.map +1 -1
- package/dist/RevisionValueCache.js +2 -2
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.d.ts +2 -2
- package/dist/RevisionView.d.ts.map +1 -1
- package/dist/RevisionView.js.map +1 -1
- package/dist/SerializationUtilities.d.ts +1 -1
- package/dist/SerializationUtilities.d.ts.map +1 -1
- package/dist/SerializationUtilities.js.map +1 -1
- package/dist/SharedTree.d.ts +8 -7
- package/dist/SharedTree.d.ts.map +1 -1
- package/dist/SharedTree.js +78 -78
- package/dist/SharedTree.js.map +1 -1
- package/dist/SharedTreeEncoder.d.ts +1 -1
- package/dist/SharedTreeEncoder.d.ts.map +1 -1
- package/dist/SharedTreeEncoder.js +31 -31
- package/dist/SharedTreeEncoder.js.map +1 -1
- package/dist/Summary.d.ts +2 -2
- package/dist/Summary.d.ts.map +1 -1
- package/dist/Summary.js +2 -2
- package/dist/Summary.js.map +1 -1
- package/dist/SummaryBackCompatibility.d.ts.map +1 -1
- package/dist/SummaryBackCompatibility.js.map +1 -1
- package/dist/SummaryTestUtilities.d.ts +1 -1
- package/dist/SummaryTestUtilities.d.ts.map +1 -1
- package/dist/SummaryTestUtilities.js.map +1 -1
- package/dist/Transaction.d.ts +3 -3
- package/dist/Transaction.d.ts.map +1 -1
- package/dist/Transaction.js +3 -3
- package/dist/Transaction.js.map +1 -1
- package/dist/TransactionInternal.d.ts +3 -3
- package/dist/TransactionInternal.d.ts.map +1 -1
- package/dist/TransactionInternal.js +6 -6
- package/dist/TransactionInternal.js.map +1 -1
- package/dist/TreeCompressor.d.ts +5 -1
- package/dist/TreeCompressor.d.ts.map +1 -1
- package/dist/TreeCompressor.js +5 -5
- package/dist/TreeCompressor.js.map +1 -1
- package/dist/TreeNodeHandle.d.ts +1 -1
- package/dist/TreeNodeHandle.d.ts.map +1 -1
- package/dist/TreeNodeHandle.js.map +1 -1
- package/dist/TreeView.d.ts +1 -1
- package/dist/TreeView.d.ts.map +1 -1
- package/dist/TreeView.js +2 -3
- package/dist/TreeView.js.map +1 -1
- package/dist/UuidUtilities.d.ts.map +1 -1
- package/dist/UuidUtilities.js.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.js +3 -3
- package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/IdCompressor.d.ts +1 -1
- package/dist/id-compressor/IdCompressor.d.ts.map +1 -1
- package/dist/id-compressor/IdCompressor.js +25 -26
- package/dist/id-compressor/IdCompressor.js.map +1 -1
- package/dist/id-compressor/IdRange.d.ts.map +1 -1
- package/dist/id-compressor/IdRange.js +2 -2
- package/dist/id-compressor/IdRange.js.map +1 -1
- package/dist/id-compressor/NumericUuid.d.ts.map +1 -1
- package/dist/id-compressor/NumericUuid.js +2 -1
- package/dist/id-compressor/NumericUuid.js.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.js +8 -9
- package/dist/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/dist/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.js +11 -11
- package/dist/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/dist/migration-shim/migrationShim.d.ts +8 -4
- package/dist/migration-shim/migrationShim.d.ts.map +1 -1
- package/dist/migration-shim/migrationShim.js +13 -13
- package/dist/migration-shim/migrationShim.js.map +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts +2 -2
- package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/migrationShimFactory.js +2 -2
- package/dist/migration-shim/migrationShimFactory.js.map +1 -1
- package/dist/migration-shim/packageVersion.d.ts +0 -2
- package/dist/migration-shim/packageVersion.d.ts.map +1 -1
- package/dist/migration-shim/packageVersion.js +0 -2
- package/dist/migration-shim/packageVersion.js.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.js +8 -8
- package/dist/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/dist/migration-shim/sharedTreeShim.d.ts +2 -2
- package/dist/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShim.js +8 -4
- package/dist/migration-shim/sharedTreeShim.js.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.js +2 -2
- package/dist/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/dist/migration-shim/shimChannelServices.js.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.js +2 -2
- package/dist/migration-shim/shimDeltaConnection.js.map +1 -1
- package/dist/migration-shim/shimHandle.d.ts.map +1 -1
- package/dist/migration-shim/shimHandle.js.map +1 -1
- package/dist/migration-shim/types.d.ts +1 -1
- package/dist/migration-shim/types.d.ts.map +1 -1
- package/dist/migration-shim/types.js.map +1 -1
- package/dist/migration-shim/utils.d.ts +1 -1
- package/dist/migration-shim/utils.d.ts.map +1 -1
- package/dist/migration-shim/utils.js.map +1 -1
- package/dist/persisted-types/0.0.2.d.ts +1 -1
- package/dist/persisted-types/0.0.2.d.ts.map +1 -1
- package/dist/persisted-types/0.0.2.js.map +1 -1
- package/dist/persisted-types/0.1.1.d.ts +1 -1
- package/dist/persisted-types/0.1.1.d.ts.map +1 -1
- package/dist/persisted-types/0.1.1.js +3 -3
- package/dist/persisted-types/0.1.1.js.map +1 -1
- package/lib/ChangeCompression.d.ts +2 -2
- package/lib/ChangeCompression.d.ts.map +1 -1
- package/lib/ChangeCompression.js +1 -1
- package/lib/ChangeCompression.js.map +1 -1
- package/lib/ChangeTypes.d.ts +1 -1
- package/lib/ChangeTypes.d.ts.map +1 -1
- package/lib/ChangeTypes.js +2 -2
- package/lib/ChangeTypes.js.map +1 -1
- package/lib/Checkout.d.ts +3 -3
- package/lib/Checkout.d.ts.map +1 -1
- package/lib/Checkout.js +4 -4
- package/lib/Checkout.js.map +1 -1
- package/lib/EditLog.d.ts +1 -1
- package/lib/EditLog.d.ts.map +1 -1
- package/lib/EditLog.js +2 -2
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.d.ts +3 -3
- package/lib/EditUtilities.d.ts.map +1 -1
- package/lib/EditUtilities.js +5 -5
- package/lib/EditUtilities.js.map +1 -1
- package/lib/Forest.d.ts.map +1 -1
- package/lib/Forest.js +2 -2
- package/lib/Forest.js.map +1 -1
- package/lib/HistoryEditFactory.d.ts +1 -1
- package/lib/HistoryEditFactory.d.ts.map +1 -1
- package/lib/HistoryEditFactory.js +5 -5
- package/lib/HistoryEditFactory.js.map +1 -1
- package/lib/IdConversion.d.ts.map +1 -1
- package/lib/IdConversion.js.map +1 -1
- package/lib/LogViewer.d.ts +2 -2
- package/lib/LogViewer.d.ts.map +1 -1
- package/lib/LogViewer.js +3 -3
- package/lib/LogViewer.js.map +1 -1
- package/lib/MergeHealth.d.ts.map +1 -1
- package/lib/MergeHealth.js +1 -1
- package/lib/MergeHealth.js.map +1 -1
- package/lib/NodeIdUtilities.d.ts +1 -1
- package/lib/NodeIdUtilities.d.ts.map +1 -1
- package/lib/NodeIdUtilities.js +1 -1
- package/lib/NodeIdUtilities.js.map +1 -1
- package/lib/PayloadUtilities.d.ts.map +1 -1
- package/lib/PayloadUtilities.js +1 -1
- package/lib/PayloadUtilities.js.map +1 -1
- package/lib/ReconciliationPath.d.ts +1 -1
- package/lib/ReconciliationPath.d.ts.map +1 -1
- package/lib/ReconciliationPath.js.map +1 -1
- package/lib/RevisionValueCache.d.ts.map +1 -1
- package/lib/RevisionValueCache.js +2 -2
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.d.ts +2 -2
- package/lib/RevisionView.d.ts.map +1 -1
- package/lib/RevisionView.js.map +1 -1
- package/lib/SerializationUtilities.d.ts +1 -1
- package/lib/SerializationUtilities.d.ts.map +1 -1
- package/lib/SerializationUtilities.js.map +1 -1
- package/lib/SharedTree.d.ts +8 -7
- package/lib/SharedTree.d.ts.map +1 -1
- package/lib/SharedTree.js +13 -13
- package/lib/SharedTree.js.map +1 -1
- package/lib/SharedTreeEncoder.d.ts +1 -1
- package/lib/SharedTreeEncoder.d.ts.map +1 -1
- package/lib/SharedTreeEncoder.js +5 -5
- package/lib/SharedTreeEncoder.js.map +1 -1
- package/lib/Summary.d.ts +2 -2
- package/lib/Summary.d.ts.map +1 -1
- package/lib/Summary.js +1 -1
- package/lib/Summary.js.map +1 -1
- package/lib/SummaryBackCompatibility.d.ts.map +1 -1
- package/lib/SummaryBackCompatibility.js.map +1 -1
- package/lib/SummaryTestUtilities.d.ts +1 -1
- package/lib/SummaryTestUtilities.d.ts.map +1 -1
- package/lib/SummaryTestUtilities.js.map +1 -1
- package/lib/Transaction.d.ts +3 -3
- package/lib/Transaction.d.ts.map +1 -1
- package/lib/Transaction.js +3 -3
- package/lib/Transaction.js.map +1 -1
- package/lib/TransactionInternal.d.ts +3 -3
- package/lib/TransactionInternal.d.ts.map +1 -1
- package/lib/TransactionInternal.js +3 -3
- package/lib/TransactionInternal.js.map +1 -1
- package/lib/TreeCompressor.d.ts +5 -1
- package/lib/TreeCompressor.d.ts.map +1 -1
- package/lib/TreeCompressor.js +2 -2
- package/lib/TreeCompressor.js.map +1 -1
- package/lib/TreeNodeHandle.d.ts +1 -1
- package/lib/TreeNodeHandle.d.ts.map +1 -1
- package/lib/TreeNodeHandle.js.map +1 -1
- package/lib/TreeView.d.ts +1 -1
- package/lib/TreeView.d.ts.map +1 -1
- package/lib/TreeView.js +1 -2
- package/lib/TreeView.js.map +1 -1
- package/lib/UuidUtilities.d.ts.map +1 -1
- package/lib/UuidUtilities.js +1 -1
- package/lib/UuidUtilities.js.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/IdCompressor.d.ts +1 -1
- package/lib/id-compressor/IdCompressor.d.ts.map +1 -1
- package/lib/id-compressor/IdCompressor.js +4 -5
- package/lib/id-compressor/IdCompressor.js.map +1 -1
- package/lib/id-compressor/IdRange.d.ts.map +1 -1
- package/lib/id-compressor/IdRange.js +1 -1
- package/lib/id-compressor/IdRange.js.map +1 -1
- package/lib/id-compressor/NumericUuid.d.ts.map +1 -1
- package/lib/id-compressor/NumericUuid.js +2 -1
- package/lib/id-compressor/NumericUuid.js.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.d.ts.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.js +1 -2
- package/lib/id-compressor/SessionIdNormalizer.js.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts +1 -1
- package/lib/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/lib/migration-shim/migrationShim.d.ts +8 -4
- package/lib/migration-shim/migrationShim.d.ts.map +1 -1
- package/lib/migration-shim/migrationShim.js +3 -3
- package/lib/migration-shim/migrationShim.js.map +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts +2 -2
- package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/migrationShimFactory.js +1 -1
- package/lib/migration-shim/migrationShimFactory.js.map +1 -1
- package/lib/migration-shim/packageVersion.d.ts +0 -2
- package/lib/migration-shim/packageVersion.d.ts.map +1 -1
- package/lib/migration-shim/packageVersion.js +0 -2
- package/lib/migration-shim/packageVersion.js.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/lib/migration-shim/sharedTreeShim.d.ts +2 -2
- package/lib/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShim.js +6 -2
- package/lib/migration-shim/sharedTreeShim.js.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/lib/migration-shim/shimChannelServices.js.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.js +1 -1
- package/lib/migration-shim/shimDeltaConnection.js.map +1 -1
- package/lib/migration-shim/shimHandle.d.ts.map +1 -1
- package/lib/migration-shim/shimHandle.js.map +1 -1
- package/lib/migration-shim/types.d.ts +1 -1
- package/lib/migration-shim/types.d.ts.map +1 -1
- package/lib/migration-shim/types.js.map +1 -1
- package/lib/migration-shim/utils.d.ts +1 -1
- package/lib/migration-shim/utils.d.ts.map +1 -1
- package/lib/migration-shim/utils.js.map +1 -1
- package/lib/persisted-types/0.0.2.d.ts +1 -1
- package/lib/persisted-types/0.0.2.d.ts.map +1 -1
- package/lib/persisted-types/0.0.2.js.map +1 -1
- package/lib/persisted-types/0.1.1.d.ts +1 -1
- package/lib/persisted-types/0.1.1.d.ts.map +1 -1
- package/lib/persisted-types/0.1.1.js +1 -1
- package/lib/persisted-types/0.1.1.js.map +1 -1
- package/package.json +33 -32
- package/src/ChangeCompression.ts +8 -8
- package/src/ChangeTypes.ts +5 -4
- package/src/Checkout.ts +9 -7
- package/src/EditLog.ts +4 -3
- package/src/EditUtilities.ts +9 -8
- package/src/Forest.ts +3 -2
- package/src/HistoryEditFactory.ts +12 -11
- package/src/IdConversion.ts +2 -2
- package/src/LogViewer.ts +5 -4
- package/src/MergeHealth.ts +2 -1
- package/src/NodeIdUtilities.ts +2 -2
- package/src/PayloadUtilities.ts +2 -1
- package/src/ReconciliationPath.ts +1 -1
- package/src/RevisionValueCache.ts +3 -2
- package/src/RevisionView.ts +3 -3
- package/src/SerializationUtilities.ts +1 -1
- package/src/SharedTree.ts +46 -49
- package/src/SharedTreeEncoder.ts +30 -29
- package/src/Summary.ts +5 -3
- package/src/SummaryBackCompatibility.ts +1 -0
- package/src/SummaryTestUtilities.ts +2 -1
- package/src/Transaction.ts +7 -6
- package/src/TransactionInternal.ts +17 -16
- package/src/TreeCompressor.ts +6 -4
- package/src/TreeNodeHandle.ts +2 -2
- package/src/TreeView.ts +3 -3
- package/src/UuidUtilities.ts +2 -1
- package/src/id-compressor/AppendOnlySortedMap.ts +2 -1
- package/src/id-compressor/IdCompressor.ts +18 -17
- package/src/id-compressor/IdRange.ts +2 -1
- package/src/id-compressor/NumericUuid.ts +1 -1
- package/src/id-compressor/SessionIdNormalizer.ts +3 -3
- package/src/migration-shim/migrationDeltaHandler.ts +3 -2
- package/src/migration-shim/migrationShim.ts +14 -10
- package/src/migration-shim/migrationShimFactory.ts +6 -4
- package/src/migration-shim/packageVersion.ts +0 -2
- package/src/migration-shim/sharedTreeDeltaHandler.ts +3 -2
- package/src/migration-shim/sharedTreeShim.ts +7 -5
- package/src/migration-shim/sharedTreeShimFactory.ts +3 -3
- package/src/migration-shim/shimChannelServices.ts +1 -1
- package/src/migration-shim/shimDeltaConnection.ts +3 -2
- package/src/migration-shim/shimHandle.ts +1 -0
- package/src/migration-shim/types.ts +3 -1
- package/src/migration-shim/utils.ts +2 -1
- package/src/persisted-types/0.0.2.ts +2 -2
- package/src/persisted-types/0.1.1.ts +10 -8
- package/dist/tree-alpha.d.ts +0 -2901
- package/dist/tree-beta.d.ts +0 -348
- package/dist/tree-public.d.ts +0 -348
- package/dist/tree-untrimmed.d.ts +0 -3820
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts +0 -6
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts.map +0 -1
- package/lib/test/AppendOnlySortedMap.perf.tests.js +0 -49
- package/lib/test/AppendOnlySortedMap.perf.tests.js.map +0 -1
- package/lib/test/AppendOnlySortedMap.tests.d.ts +0 -6
- package/lib/test/AppendOnlySortedMap.tests.d.ts.map +0 -1
- package/lib/test/AppendOnlySortedMap.tests.js +0 -213
- package/lib/test/AppendOnlySortedMap.tests.js.map +0 -1
- package/lib/test/ChangeCompression.tests.d.ts +0 -6
- package/lib/test/ChangeCompression.tests.d.ts.map +0 -1
- package/lib/test/ChangeCompression.tests.js +0 -154
- package/lib/test/ChangeCompression.tests.js.map +0 -1
- package/lib/test/Checkout.tests.d.ts +0 -10
- package/lib/test/Checkout.tests.d.ts.map +0 -1
- package/lib/test/Checkout.tests.js +0 -460
- package/lib/test/Checkout.tests.js.map +0 -1
- package/lib/test/Common.tests.d.ts +0 -6
- package/lib/test/Common.tests.d.ts.map +0 -1
- package/lib/test/Common.tests.js +0 -102
- package/lib/test/Common.tests.js.map +0 -1
- package/lib/test/EagerCheckout.tests.d.ts +0 -6
- package/lib/test/EagerCheckout.tests.d.ts.map +0 -1
- package/lib/test/EagerCheckout.tests.js +0 -20
- package/lib/test/EagerCheckout.tests.js.map +0 -1
- package/lib/test/Edit.tests.d.ts +0 -6
- package/lib/test/Edit.tests.d.ts.map +0 -1
- package/lib/test/Edit.tests.js +0 -60
- package/lib/test/Edit.tests.js.map +0 -1
- package/lib/test/EditLog.perf.tests.d.ts +0 -6
- package/lib/test/EditLog.perf.tests.d.ts.map +0 -1
- package/lib/test/EditLog.perf.tests.js +0 -41
- package/lib/test/EditLog.perf.tests.js.map +0 -1
- package/lib/test/EditLog.tests.d.ts +0 -6
- package/lib/test/EditLog.tests.d.ts.map +0 -1
- package/lib/test/EditLog.tests.js +0 -355
- package/lib/test/EditLog.tests.js.map +0 -1
- package/lib/test/EditUtilities.tests.d.ts +0 -6
- package/lib/test/EditUtilities.tests.d.ts.map +0 -1
- package/lib/test/EditUtilities.tests.js +0 -512
- package/lib/test/EditUtilities.tests.js.map +0 -1
- package/lib/test/Forest.perf.tests.d.ts +0 -6
- package/lib/test/Forest.perf.tests.d.ts.map +0 -1
- package/lib/test/Forest.perf.tests.js +0 -135
- package/lib/test/Forest.perf.tests.js.map +0 -1
- package/lib/test/Forest.tests.d.ts +0 -6
- package/lib/test/Forest.tests.d.ts.map +0 -1
- package/lib/test/Forest.tests.js +0 -213
- package/lib/test/Forest.tests.js.map +0 -1
- package/lib/test/GenericTransaction.tests.d.ts +0 -6
- package/lib/test/GenericTransaction.tests.d.ts.map +0 -1
- package/lib/test/GenericTransaction.tests.js +0 -31
- package/lib/test/GenericTransaction.tests.js.map +0 -1
- package/lib/test/HistoryEditFactory.tests.d.ts +0 -6
- package/lib/test/HistoryEditFactory.tests.d.ts.map +0 -1
- package/lib/test/HistoryEditFactory.tests.js +0 -170
- package/lib/test/HistoryEditFactory.tests.js.map +0 -1
- package/lib/test/IdCompressor.perf.tests.d.ts +0 -6
- package/lib/test/IdCompressor.perf.tests.d.ts.map +0 -1
- package/lib/test/IdCompressor.perf.tests.js +0 -290
- package/lib/test/IdCompressor.perf.tests.js.map +0 -1
- package/lib/test/IdCompressor.tests.d.ts +0 -6
- package/lib/test/IdCompressor.tests.d.ts.map +0 -1
- package/lib/test/IdCompressor.tests.js +0 -1542
- package/lib/test/IdCompressor.tests.js.map +0 -1
- package/lib/test/IdConversion.tests.d.ts +0 -6
- package/lib/test/IdConversion.tests.d.ts.map +0 -1
- package/lib/test/IdConversion.tests.js +0 -36
- package/lib/test/IdConversion.tests.js.map +0 -1
- package/lib/test/LazyCheckout.tests.d.ts +0 -6
- package/lib/test/LazyCheckout.tests.d.ts.map +0 -1
- package/lib/test/LazyCheckout.tests.js +0 -22
- package/lib/test/LazyCheckout.tests.js.map +0 -1
- package/lib/test/LogViewer.tests.d.ts +0 -6
- package/lib/test/LogViewer.tests.d.ts.map +0 -1
- package/lib/test/LogViewer.tests.js +0 -588
- package/lib/test/LogViewer.tests.js.map +0 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts +0 -6
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.d.ts.map +0 -1
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js +0 -351
- package/lib/test/MergeHealthTelemetryHeartbeat.tests.js.map +0 -1
- package/lib/test/NumericUuid.perf.tests.d.ts +0 -6
- package/lib/test/NumericUuid.perf.tests.d.ts.map +0 -1
- package/lib/test/NumericUuid.perf.tests.js +0 -68
- package/lib/test/NumericUuid.perf.tests.js.map +0 -1
- package/lib/test/NumericUuid.tests.d.ts +0 -6
- package/lib/test/NumericUuid.tests.d.ts.map +0 -1
- package/lib/test/NumericUuid.tests.js +0 -192
- package/lib/test/NumericUuid.tests.js.map +0 -1
- package/lib/test/RevisionValueCache.tests.d.ts +0 -6
- package/lib/test/RevisionValueCache.tests.d.ts.map +0 -1
- package/lib/test/RevisionValueCache.tests.js +0 -106
- package/lib/test/RevisionValueCache.tests.js.map +0 -1
- package/lib/test/RevisionView.tests.d.ts +0 -6
- package/lib/test/RevisionView.tests.d.ts.map +0 -1
- package/lib/test/RevisionView.tests.js +0 -131
- package/lib/test/RevisionView.tests.js.map +0 -1
- package/lib/test/SessionIdNormalizer.tests.d.ts +0 -6
- package/lib/test/SessionIdNormalizer.tests.d.ts.map +0 -1
- package/lib/test/SessionIdNormalizer.tests.js +0 -377
- package/lib/test/SessionIdNormalizer.tests.js.map +0 -1
- package/lib/test/SharedTree.fuzz.tests.d.ts +0 -6
- package/lib/test/SharedTree.fuzz.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.fuzz.tests.js +0 -9
- package/lib/test/SharedTree.fuzz.tests.js.map +0 -1
- package/lib/test/SharedTree.perf.tests.d.ts +0 -6
- package/lib/test/SharedTree.perf.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.perf.tests.js +0 -39
- package/lib/test/SharedTree.perf.tests.js.map +0 -1
- package/lib/test/SharedTree.tests.d.ts +0 -6
- package/lib/test/SharedTree.tests.d.ts.map +0 -1
- package/lib/test/SharedTree.tests.js +0 -22
- package/lib/test/SharedTree.tests.js.map +0 -1
- package/lib/test/StringInterner.tests.d.ts +0 -6
- package/lib/test/StringInterner.tests.d.ts.map +0 -1
- package/lib/test/StringInterner.tests.js +0 -73
- package/lib/test/StringInterner.tests.js.map +0 -1
- package/lib/test/Summary.tests.d.ts +0 -7
- package/lib/test/Summary.tests.d.ts.map +0 -1
- package/lib/test/Summary.tests.js +0 -386
- package/lib/test/Summary.tests.js.map +0 -1
- package/lib/test/Transaction.tests.d.ts +0 -6
- package/lib/test/Transaction.tests.d.ts.map +0 -1
- package/lib/test/Transaction.tests.js +0 -124
- package/lib/test/Transaction.tests.js.map +0 -1
- package/lib/test/TransactionInternal.tests.d.ts +0 -6
- package/lib/test/TransactionInternal.tests.d.ts.map +0 -1
- package/lib/test/TransactionInternal.tests.js +0 -576
- package/lib/test/TransactionInternal.tests.js.map +0 -1
- package/lib/test/TreeCompression.tests.d.ts +0 -6
- package/lib/test/TreeCompression.tests.d.ts.map +0 -1
- package/lib/test/TreeCompression.tests.js +0 -291
- package/lib/test/TreeCompression.tests.js.map +0 -1
- package/lib/test/TreeView.tests.d.ts +0 -6
- package/lib/test/TreeView.tests.d.ts.map +0 -1
- package/lib/test/TreeView.tests.js +0 -178
- package/lib/test/TreeView.tests.js.map +0 -1
- package/lib/test/UndoRedoHandler.tests.d.ts +0 -6
- package/lib/test/UndoRedoHandler.tests.d.ts.map +0 -1
- package/lib/test/UndoRedoHandler.tests.js +0 -37
- package/lib/test/UndoRedoHandler.tests.js.map +0 -1
- package/lib/test/fuzz/Generators.d.ts +0 -8
- package/lib/test/fuzz/Generators.d.ts.map +0 -1
- package/lib/test/fuzz/Generators.js +0 -345
- package/lib/test/fuzz/Generators.js.map +0 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +0 -23
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +0 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.js +0 -241
- package/lib/test/fuzz/SharedTreeFuzzTests.js.map +0 -1
- package/lib/test/fuzz/Types.d.ts +0 -136
- package/lib/test/fuzz/Types.d.ts.map +0 -1
- package/lib/test/fuzz/Types.js +0 -6
- package/lib/test/fuzz/Types.js.map +0 -1
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts +0 -246
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +0 -1
- package/lib/test/utilities/IdCompressorTestUtilities.js +0 -608
- package/lib/test/utilities/IdCompressorTestUtilities.js.map +0 -1
- package/lib/test/utilities/MockTransaction.d.ts +0 -35
- package/lib/test/utilities/MockTransaction.d.ts.map +0 -1
- package/lib/test/utilities/MockTransaction.js +0 -51
- package/lib/test/utilities/MockTransaction.js.map +0 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts +0 -12
- package/lib/test/utilities/PendingLocalStateTests.d.ts.map +0 -1
- package/lib/test/utilities/PendingLocalStateTests.js +0 -223
- package/lib/test/utilities/PendingLocalStateTests.js.map +0 -1
- package/lib/test/utilities/SharedTreeTests.d.ts +0 -12
- package/lib/test/utilities/SharedTreeTests.d.ts.map +0 -1
- package/lib/test/utilities/SharedTreeTests.js +0 -949
- package/lib/test/utilities/SharedTreeTests.js.map +0 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts +0 -11
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +0 -1
- package/lib/test/utilities/SharedTreeVersioningTests.js +0 -439
- package/lib/test/utilities/SharedTreeVersioningTests.js.map +0 -1
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts +0 -10
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts.map +0 -1
- package/lib/test/utilities/SummaryLoadPerfTests.js +0 -105
- package/lib/test/utilities/SummaryLoadPerfTests.js.map +0 -1
- package/lib/test/utilities/SummarySizeTests.d.ts +0 -11
- package/lib/test/utilities/SummarySizeTests.d.ts.map +0 -1
- package/lib/test/utilities/SummarySizeTests.js +0 -160
- package/lib/test/utilities/SummarySizeTests.js.map +0 -1
- package/lib/test/utilities/TestCommon.d.ts +0 -13
- package/lib/test/utilities/TestCommon.d.ts.map +0 -1
- package/lib/test/utilities/TestCommon.js +0 -19
- package/lib/test/utilities/TestCommon.js.map +0 -1
- package/lib/test/utilities/TestNode.d.ts +0 -140
- package/lib/test/utilities/TestNode.d.ts.map +0 -1
- package/lib/test/utilities/TestNode.js +0 -282
- package/lib/test/utilities/TestNode.js.map +0 -1
- package/lib/test/utilities/TestSerializer.d.ts +0 -24
- package/lib/test/utilities/TestSerializer.d.ts.map +0 -1
- package/lib/test/utilities/TestSerializer.js +0 -40
- package/lib/test/utilities/TestSerializer.js.map +0 -1
- package/lib/test/utilities/TestUtilities.d.ts +0 -212
- package/lib/test/utilities/TestUtilities.d.ts.map +0 -1
- package/lib/test/utilities/TestUtilities.js +0 -413
- package/lib/test/utilities/TestUtilities.js.map +0 -1
- package/lib/test/utilities/UndoRedoTests.d.ts +0 -32
- package/lib/test/utilities/UndoRedoTests.d.ts.map +0 -1
- package/lib/test/utilities/UndoRedoTests.js +0 -317
- package/lib/test/utilities/UndoRedoTests.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { strict as assert } from 'assert';
|
|
6
|
-
import { LoaderHeader } from '@fluidframework/container-definitions';
|
|
7
|
-
import { MockFluidDataStoreRuntime, validateAssertionError } from '@fluidframework/test-runtime-utils';
|
|
8
|
-
import { expect } from 'chai';
|
|
9
|
-
import { StableRange, StablePlace, Change } from '../../ChangeTypes.js';
|
|
10
|
-
import { areRevisionViewsSemanticallyEqual } from '../../EditUtilities.js';
|
|
11
|
-
import { SharedTreeDiagnosticEvent } from '../../EventTypes.js';
|
|
12
|
-
import { SharedTreeOpType, WriteFormat } from '../../persisted-types/index.js';
|
|
13
|
-
import { SharedTree } from '../../SharedTree.js';
|
|
14
|
-
import { TreeNodeHandle } from '../../TreeNodeHandle.js';
|
|
15
|
-
import { nilUuid } from '../../UuidUtilities.js';
|
|
16
|
-
import { applyTestEdits } from '../Summary.tests.js';
|
|
17
|
-
import { buildLeaf } from './TestNode.js';
|
|
18
|
-
import { applyNoop, setUpLocalServerTestSharedTree, setUpTestTree, spyOnSubmittedOps, testTrait, waitForSummary, } from './TestUtilities.js';
|
|
19
|
-
function spyOnVersionChanges(tree) {
|
|
20
|
-
const versions = [];
|
|
21
|
-
tree.on(SharedTreeDiagnosticEvent.WriteVersionChanged, (version) => versions.push(version));
|
|
22
|
-
return versions;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Runs a test suite for operations on `SharedTree` that depend on correct versioning.
|
|
26
|
-
* This suite can be used to test other implementations that aim to fulfill `SharedTree`'s contract.
|
|
27
|
-
*/
|
|
28
|
-
export function runSharedTreeVersioningTests(title, setUpTestSharedTree) {
|
|
29
|
-
describe(title, () => {
|
|
30
|
-
const oldVersion = WriteFormat.v0_0_2;
|
|
31
|
-
const newVersion = WriteFormat.v0_1_1;
|
|
32
|
-
const treeOptions = { localMode: false, writeFormat: oldVersion };
|
|
33
|
-
const secondTreeOptions = {
|
|
34
|
-
id: 'secondTestSharedTree',
|
|
35
|
-
localMode: false,
|
|
36
|
-
writeFormat: newVersion,
|
|
37
|
-
};
|
|
38
|
-
it('defaults to latest version if no version is specified when creating factory', () => {
|
|
39
|
-
const sharedTree = SharedTree.getFactory().create(new MockFluidDataStoreRuntime(), 'SharedTree');
|
|
40
|
-
const writeFormats = Object.values(WriteFormat);
|
|
41
|
-
expect(sharedTree.getWriteFormat()).to.equal(writeFormats[writeFormats.length - 1]);
|
|
42
|
-
});
|
|
43
|
-
it('only processes edit ops if they have the same version', () => {
|
|
44
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);
|
|
45
|
-
const { tree: newerTree } = setUpTestSharedTree({ containerRuntimeFactory, ...secondTreeOptions });
|
|
46
|
-
expect(tree.edits.length).to.equal(0);
|
|
47
|
-
expect(newerTree.edits.length).to.equal(0);
|
|
48
|
-
// Process an edit
|
|
49
|
-
applyNoop(tree);
|
|
50
|
-
containerRuntimeFactory.processAllMessages();
|
|
51
|
-
// The newer tree should have ignored the first edit
|
|
52
|
-
expect(tree.edits.length).to.equal(1);
|
|
53
|
-
expect(newerTree.edits.length).to.equal(0);
|
|
54
|
-
});
|
|
55
|
-
it('resubmits ops concurrent to an update op using the new format', () => {
|
|
56
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);
|
|
57
|
-
const { tree: newerTree } = setUpTestSharedTree({
|
|
58
|
-
...treeOptions,
|
|
59
|
-
containerRuntimeFactory,
|
|
60
|
-
writeFormat: newVersion,
|
|
61
|
-
});
|
|
62
|
-
const testTree = setUpTestTree(tree);
|
|
63
|
-
const rootStableId = testTree.stable.identifier;
|
|
64
|
-
containerRuntimeFactory.processAllMessages();
|
|
65
|
-
const summary = tree.saveSummary();
|
|
66
|
-
const ops = spyOnSubmittedOps(containerRuntimeFactory);
|
|
67
|
-
newerTree.loadSummary(summary);
|
|
68
|
-
tree.applyEdit(...Change.move(StableRange.only(testTree.left), StablePlace.after(testTree.right)));
|
|
69
|
-
containerRuntimeFactory.processAllMessages();
|
|
70
|
-
// Verify even though one edit was applied, 2 edit ops were sent due to the version upgrade.
|
|
71
|
-
expect(ops.length).to.equal(3);
|
|
72
|
-
expect(ops.map((op) => op.type)).to.eql([
|
|
73
|
-
SharedTreeOpType.Update,
|
|
74
|
-
SharedTreeOpType.Edit,
|
|
75
|
-
SharedTreeOpType.Edit,
|
|
76
|
-
]);
|
|
77
|
-
expect(ops[1].version).to.equal(oldVersion);
|
|
78
|
-
expect(ops[2].version).to.equal(newVersion);
|
|
79
|
-
// Verify both trees apply the updated op.
|
|
80
|
-
const handle = new TreeNodeHandle(tree.currentView, tree.convertToNodeId(rootStableId));
|
|
81
|
-
expect(handle.traits[testTree.left.traitLabel]).to.equal(undefined);
|
|
82
|
-
expect(handle.traits[testTree.right.traitLabel].length).to.equal(2);
|
|
83
|
-
const handle2 = new TreeNodeHandle(newerTree.currentView, newerTree.convertToNodeId(rootStableId));
|
|
84
|
-
expect(handle2.traits[testTree.left.traitLabel]).to.equal(undefined);
|
|
85
|
-
expect(handle2.traits[testTree.right.traitLabel].length).to.equal(2);
|
|
86
|
-
});
|
|
87
|
-
it('throws if an edit op with a newer version than the write version is received', () => {
|
|
88
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);
|
|
89
|
-
const { tree: newerTree } = setUpTestSharedTree({ containerRuntimeFactory, ...secondTreeOptions });
|
|
90
|
-
expect(tree.edits.length).to.equal(0);
|
|
91
|
-
expect(newerTree.edits.length).to.equal(0);
|
|
92
|
-
// Process an edit and expect it to throw
|
|
93
|
-
applyNoop(newerTree);
|
|
94
|
-
assert.throws(() => containerRuntimeFactory.processAllMessages(), (e) => validateAssertionError(e, 'Newer op version received by a client that has yet to be updated.'));
|
|
95
|
-
});
|
|
96
|
-
it('ignores duplicate update ops', () => {
|
|
97
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);
|
|
98
|
-
// Process an edit
|
|
99
|
-
applyNoop(tree);
|
|
100
|
-
containerRuntimeFactory.processAllMessages();
|
|
101
|
-
const summary = tree.saveSummary();
|
|
102
|
-
// Load the summary into multiple newer trees to trigger version update ops
|
|
103
|
-
const { tree: newerTree, containerRuntimeFactory: newerContainerRuntimeFactory } = setUpTestSharedTree(secondTreeOptions);
|
|
104
|
-
const { tree: newerTree2 } = setUpTestSharedTree({
|
|
105
|
-
containerRuntimeFactory: newerContainerRuntimeFactory,
|
|
106
|
-
...secondTreeOptions,
|
|
107
|
-
});
|
|
108
|
-
const { tree: newerTree3 } = setUpTestSharedTree({
|
|
109
|
-
containerRuntimeFactory: newerContainerRuntimeFactory,
|
|
110
|
-
...secondTreeOptions,
|
|
111
|
-
});
|
|
112
|
-
const versions = spyOnVersionChanges(newerTree);
|
|
113
|
-
const versions2 = spyOnVersionChanges(newerTree2);
|
|
114
|
-
const versions3 = spyOnVersionChanges(newerTree3);
|
|
115
|
-
newerTree.loadSummary(summary);
|
|
116
|
-
newerTree2.loadSummary(summary);
|
|
117
|
-
newerTree3.loadSummary(summary);
|
|
118
|
-
newerContainerRuntimeFactory.processAllMessages();
|
|
119
|
-
// Each tree should have processed a version update once
|
|
120
|
-
expect(versions).to.deep.equal([oldVersion, newVersion]);
|
|
121
|
-
expect(versions2).to.deep.equal([oldVersion, newVersion]);
|
|
122
|
-
expect(versions3).to.deep.equal([oldVersion, newVersion]);
|
|
123
|
-
});
|
|
124
|
-
it('maintains custom EditLog and LogViewer callbacks when updating', () => {
|
|
125
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);
|
|
126
|
-
containerRuntimeFactory.processAllMessages();
|
|
127
|
-
const summary = tree.saveSummary();
|
|
128
|
-
let editAdded = 0;
|
|
129
|
-
// Load the summary into multiple newer trees to trigger version update ops
|
|
130
|
-
const { tree: newerTree, containerRuntimeFactory: newerContainerRuntimeFactory } = setUpTestSharedTree(secondTreeOptions);
|
|
131
|
-
const versions = spyOnVersionChanges(newerTree);
|
|
132
|
-
newerTree.loadSummary(summary);
|
|
133
|
-
newerTree.edits.registerEditAddedHandler(() => editAdded++);
|
|
134
|
-
expect(versions).to.have.length(1);
|
|
135
|
-
expect(versions[0]).to.equal(oldVersion);
|
|
136
|
-
// Update occurs after the handler is added to the old edit log
|
|
137
|
-
newerContainerRuntimeFactory.processAllMessages();
|
|
138
|
-
expect(newerTree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
139
|
-
expect(versions).to.have.length(2);
|
|
140
|
-
expect(versions[1]).to.equal(newVersion);
|
|
141
|
-
const additionalEdits = 5;
|
|
142
|
-
for (let i = 0; i < additionalEdits; i++) {
|
|
143
|
-
applyNoop(newerTree);
|
|
144
|
-
}
|
|
145
|
-
newerContainerRuntimeFactory.processAllMessages();
|
|
146
|
-
// The edit added handler should run twice for each additional edit (once when applying locally and once when applying the sequenced edit)
|
|
147
|
-
expect(editAdded).to.equal(additionalEdits * 2);
|
|
148
|
-
});
|
|
149
|
-
it('begins writing the new version only after updating', () => {
|
|
150
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);
|
|
151
|
-
// Process an edit
|
|
152
|
-
applyNoop(tree);
|
|
153
|
-
containerRuntimeFactory.processAllMessages();
|
|
154
|
-
const summary = tree.saveSummary();
|
|
155
|
-
// Load the summary into a newer tree to trigger a version update op
|
|
156
|
-
const { tree: newerTree, containerRuntimeFactory: newerContainerRuntimeFactory } = setUpTestSharedTree(secondTreeOptions);
|
|
157
|
-
const ops = spyOnSubmittedOps(newerContainerRuntimeFactory);
|
|
158
|
-
newerTree.loadSummary(summary);
|
|
159
|
-
applyNoop(newerTree);
|
|
160
|
-
newerContainerRuntimeFactory.processAllMessages();
|
|
161
|
-
expect(newerTree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
162
|
-
applyNoop(newerTree);
|
|
163
|
-
expect(ops.length).to.equal(4);
|
|
164
|
-
expect(ops.map((op) => op.type)).to.eql([
|
|
165
|
-
SharedTreeOpType.Update,
|
|
166
|
-
SharedTreeOpType.Edit,
|
|
167
|
-
SharedTreeOpType.Edit,
|
|
168
|
-
SharedTreeOpType.Edit,
|
|
169
|
-
]);
|
|
170
|
-
// Because the first op was submitted before the Update message was sequenced, it should use
|
|
171
|
-
// the same write format as the loaded summary.
|
|
172
|
-
expect(ops[1].version).to.equal(oldVersion);
|
|
173
|
-
expect(ops[2].version).to.equal(newVersion);
|
|
174
|
-
expect(ops[3].version).to.equal(newVersion);
|
|
175
|
-
});
|
|
176
|
-
it('Existing client can update to a write version higher than the initialized write version', () => {
|
|
177
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);
|
|
178
|
-
const versions = spyOnVersionChanges(tree);
|
|
179
|
-
const ops = spyOnSubmittedOps(containerRuntimeFactory);
|
|
180
|
-
// Process an edit
|
|
181
|
-
applyNoop(tree);
|
|
182
|
-
containerRuntimeFactory.processAllMessages();
|
|
183
|
-
const summary = tree.saveSummary();
|
|
184
|
-
// Load the summary into a newer tree to trigger a version update op
|
|
185
|
-
const { tree: newerTree } = setUpTestSharedTree({ containerRuntimeFactory, ...secondTreeOptions });
|
|
186
|
-
newerTree.loadSummary(summary);
|
|
187
|
-
containerRuntimeFactory.processAllMessages();
|
|
188
|
-
expect(tree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
189
|
-
expect(newerTree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
190
|
-
// Apply another arbitrary edit to the initial tree, which should now be using the new write version.
|
|
191
|
-
applyNoop(tree);
|
|
192
|
-
expect(versions).to.eql([newVersion]);
|
|
193
|
-
expect(ops.length).to.equal(3);
|
|
194
|
-
expect(ops.map((op) => op.type)).to.eql([
|
|
195
|
-
SharedTreeOpType.Edit,
|
|
196
|
-
SharedTreeOpType.Update,
|
|
197
|
-
SharedTreeOpType.Edit,
|
|
198
|
-
]);
|
|
199
|
-
expect(ops[0].version).to.equal(oldVersion);
|
|
200
|
-
expect(ops[2].version).to.equal(newVersion);
|
|
201
|
-
});
|
|
202
|
-
it('New client can update to a write version higher than the initialized version on summary load', () => {
|
|
203
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree({
|
|
204
|
-
...treeOptions,
|
|
205
|
-
writeFormat: newVersion,
|
|
206
|
-
});
|
|
207
|
-
const ops = spyOnSubmittedOps(containerRuntimeFactory);
|
|
208
|
-
applyNoop(tree);
|
|
209
|
-
containerRuntimeFactory.processAllMessages();
|
|
210
|
-
const summary = tree.saveSummary();
|
|
211
|
-
// Load the summary into a tree with older write version; it should recognize the document is already using
|
|
212
|
-
// the new write version and use that instead.
|
|
213
|
-
const { tree: olderTree } = setUpTestSharedTree({
|
|
214
|
-
...treeOptions,
|
|
215
|
-
containerRuntimeFactory,
|
|
216
|
-
writeFormat: oldVersion,
|
|
217
|
-
});
|
|
218
|
-
olderTree.loadSummary(summary);
|
|
219
|
-
applyNoop(olderTree);
|
|
220
|
-
containerRuntimeFactory.processAllMessages();
|
|
221
|
-
expect(ops.length).to.equal(2);
|
|
222
|
-
expect(ops.map((op) => op.type)).to.eql([SharedTreeOpType.Edit, SharedTreeOpType.Edit]);
|
|
223
|
-
expect(ops.map((op) => op.version)).to.eql([newVersion, newVersion]);
|
|
224
|
-
});
|
|
225
|
-
it('can load a 0.1.1 summary and access the current view', () => {
|
|
226
|
-
// This is a regression test for the logic initializing SharedTree's EditLog from a summary.
|
|
227
|
-
// The 0.1.1 format omits `currentTree`, but EditLog should still tolerate synchronous access
|
|
228
|
-
// of the first edit in the session (which is a single insert containing that tree).
|
|
229
|
-
const options = {
|
|
230
|
-
writeFormat: WriteFormat.v0_1_1,
|
|
231
|
-
summarizeHistory: false,
|
|
232
|
-
localMode: false,
|
|
233
|
-
};
|
|
234
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree(options);
|
|
235
|
-
applyNoop(tree);
|
|
236
|
-
containerRuntimeFactory.processAllMessages();
|
|
237
|
-
const summary = tree.saveSummary();
|
|
238
|
-
const { tree: newTree } = setUpTestSharedTree({ containerRuntimeFactory, ...options });
|
|
239
|
-
newTree.loadSummary(summary);
|
|
240
|
-
expect(newTree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
241
|
-
expect(() => newTree.currentView).to.not.throw();
|
|
242
|
-
});
|
|
243
|
-
it('upgrades properly when no edits are sent', async () => {
|
|
244
|
-
// Starts in 0.0.2 (so no upgrade)
|
|
245
|
-
const { testObjectProvider, tree: tree1 } = await setUpLocalServerTestSharedTree({
|
|
246
|
-
writeFormat: WriteFormat.v0_0_2,
|
|
247
|
-
});
|
|
248
|
-
const { tree: tree2 } = await setUpLocalServerTestSharedTree({
|
|
249
|
-
writeFormat: WriteFormat.v0_1_1,
|
|
250
|
-
testObjectProvider,
|
|
251
|
-
});
|
|
252
|
-
expect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_0_2);
|
|
253
|
-
expect(tree2.getWriteFormat()).to.equal(WriteFormat.v0_0_2);
|
|
254
|
-
await testObjectProvider.ensureSynchronized();
|
|
255
|
-
expect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
256
|
-
expect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
257
|
-
expect(tree1.equals(tree2)).to.be.true;
|
|
258
|
-
});
|
|
259
|
-
it('generates unique IDs after upgrading from 0.0.2', async () => {
|
|
260
|
-
const idCount = 100;
|
|
261
|
-
const { testObjectProvider, tree: tree } = await setUpLocalServerTestSharedTree({
|
|
262
|
-
writeFormat: WriteFormat.v0_0_2,
|
|
263
|
-
});
|
|
264
|
-
applyTestEdits(tree);
|
|
265
|
-
const nodeIds = new Set();
|
|
266
|
-
const stableIds = new Set();
|
|
267
|
-
for (let i = 0; i < idCount; i++) {
|
|
268
|
-
const id = tree.generateNodeId();
|
|
269
|
-
nodeIds.add(id);
|
|
270
|
-
stableIds.add(tree.convertToStableNodeId(id));
|
|
271
|
-
}
|
|
272
|
-
// New tree joins, causes an upgrade
|
|
273
|
-
await setUpLocalServerTestSharedTree({
|
|
274
|
-
writeFormat: WriteFormat.v0_1_1,
|
|
275
|
-
testObjectProvider,
|
|
276
|
-
});
|
|
277
|
-
await testObjectProvider.ensureSynchronized();
|
|
278
|
-
expect(tree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
279
|
-
for (let i = 0; i < idCount; i++) {
|
|
280
|
-
// No IDs should be generated that were already generated before the update
|
|
281
|
-
const id = tree.generateNodeId();
|
|
282
|
-
expect(nodeIds.has(id)).to.be.false;
|
|
283
|
-
expect(stableIds.has(tree.convertToStableNodeId(id))).to.be.false;
|
|
284
|
-
}
|
|
285
|
-
expect(tree.equals(tree)).to.be.true;
|
|
286
|
-
});
|
|
287
|
-
it('converts IDs correctly after upgrading from 0.0.2', async () => {
|
|
288
|
-
const { testObjectProvider, tree: tree1 } = await setUpLocalServerTestSharedTree({
|
|
289
|
-
writeFormat: WriteFormat.v0_0_2,
|
|
290
|
-
});
|
|
291
|
-
const idCount = 10;
|
|
292
|
-
const ids = [];
|
|
293
|
-
for (let i = 0; i < idCount; i++) {
|
|
294
|
-
const id = tree1.generateNodeId();
|
|
295
|
-
ids.push([id, tree1.convertToStableNodeId(id)]);
|
|
296
|
-
}
|
|
297
|
-
// Use some of the IDs in edits, but leave others unused.
|
|
298
|
-
// They should all be valid and usable after upgrade.
|
|
299
|
-
const builds = [];
|
|
300
|
-
for (let i = 1; i < ids.length; i += 2) {
|
|
301
|
-
builds.push(buildLeaf(ids[i][0], i));
|
|
302
|
-
}
|
|
303
|
-
tree1.applyEdit(...Change.insertTree(builds, StablePlace.atEndOf({ parent: tree1.currentView.root, label: 'foo' })));
|
|
304
|
-
const { tree: tree2 } = await setUpLocalServerTestSharedTree({
|
|
305
|
-
writeFormat: WriteFormat.v0_1_1,
|
|
306
|
-
testObjectProvider,
|
|
307
|
-
// To be removed ADO:5464
|
|
308
|
-
featureGates: {
|
|
309
|
-
'Fluid.Container.ForceWriteConnection': true,
|
|
310
|
-
},
|
|
311
|
-
});
|
|
312
|
-
await testObjectProvider.ensureSynchronized();
|
|
313
|
-
expect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
314
|
-
expect(tree2.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
315
|
-
const view = tree1.currentView;
|
|
316
|
-
for (let i = 0; i < ids.length; i++) {
|
|
317
|
-
const [nodeIdBefore, stableIdBefore] = ids[i];
|
|
318
|
-
expect(tree1.convertToStableNodeId(nodeIdBefore)).to.equal(stableIdBefore);
|
|
319
|
-
if (i % 2 === 0) {
|
|
320
|
-
expect(view.hasNode(nodeIdBefore)).to.be.false;
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
expect(view.hasNode(nodeIdBefore)).to.be.true;
|
|
324
|
-
const node = view.getViewNode(nodeIdBefore);
|
|
325
|
-
expect(node.payload).to.equal(i);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
expect(tree1.equals(tree2)).to.be.true;
|
|
329
|
-
// https://dev.azure.com/fluidframework/internal/_workitems/edit/3347
|
|
330
|
-
const events = testObjectProvider.logger.reportAndClearTrackedEvents();
|
|
331
|
-
expect(events.unexpectedErrors.length).to.equal(1);
|
|
332
|
-
expect(events.unexpectedErrors[0].eventName).to.equal('fluid:telemetry:ContainerRuntime:Outbox:ReferenceSequenceNumberMismatch');
|
|
333
|
-
});
|
|
334
|
-
it('interns strings correctly after upgrading from 0.0.2', async () => {
|
|
335
|
-
const { testObjectProvider, tree: tree1, container, } = await setUpLocalServerTestSharedTree({
|
|
336
|
-
writeFormat: WriteFormat.v0_0_2,
|
|
337
|
-
summarizeHistory: false,
|
|
338
|
-
});
|
|
339
|
-
const internedDefinition = 'internedDefinition';
|
|
340
|
-
const id = tree1.generateNodeId();
|
|
341
|
-
tree1.applyEdit(...Change.insertTree({ definition: internedDefinition, identifier: id }, StablePlace.atStartOf(testTrait(tree1.currentView))));
|
|
342
|
-
tree1.applyEdit(Change.delete(StableRange.only(id)));
|
|
343
|
-
await testObjectProvider.ensureSynchronized();
|
|
344
|
-
const summaryVersion = await waitForSummary(container);
|
|
345
|
-
const { tree: tree2 } = await setUpLocalServerTestSharedTree({
|
|
346
|
-
writeFormat: WriteFormat.v0_1_1,
|
|
347
|
-
testObjectProvider,
|
|
348
|
-
headers: { [LoaderHeader.version]: summaryVersion },
|
|
349
|
-
});
|
|
350
|
-
await testObjectProvider.ensureSynchronized();
|
|
351
|
-
expect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
352
|
-
expect(tree2.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
353
|
-
tree1.applyEdit(...Change.insertTree({ definition: internedDefinition, identifier: tree1.generateNodeId() }, StablePlace.atStartOf(testTrait(tree1.currentView))));
|
|
354
|
-
await testObjectProvider.ensureSynchronized();
|
|
355
|
-
expect(areRevisionViewsSemanticallyEqual(tree1.currentView, tree1, tree2.currentView, tree2)).to.be.true;
|
|
356
|
-
}).timeout(10000);
|
|
357
|
-
it('attributes all pre-upgrade IDs to the nil UUID after upgrading from 0.0.2', async () => {
|
|
358
|
-
const { testObjectProvider, tree: tree } = await setUpLocalServerTestSharedTree({
|
|
359
|
-
writeFormat: WriteFormat.v0_0_2,
|
|
360
|
-
});
|
|
361
|
-
const attributionId = tree.attributionId;
|
|
362
|
-
expect(attributionId).to.equal(nilUuid);
|
|
363
|
-
const nodeId = tree.generateNodeId();
|
|
364
|
-
const stableNodeId = tree.convertToStableNodeId(nodeId);
|
|
365
|
-
tree.applyEdit(Change.insertTree(buildLeaf(nodeId), StablePlace.atStartOf(testTrait(tree.currentView))));
|
|
366
|
-
// New tree joins, causes an upgrade
|
|
367
|
-
const { tree: tree2 } = await setUpLocalServerTestSharedTree({
|
|
368
|
-
writeFormat: WriteFormat.v0_1_1,
|
|
369
|
-
testObjectProvider,
|
|
370
|
-
// To be removed ADO:5464
|
|
371
|
-
featureGates: {
|
|
372
|
-
'Fluid.Container.ForceWriteConnection': true,
|
|
373
|
-
},
|
|
374
|
-
});
|
|
375
|
-
await testObjectProvider.ensureSynchronized();
|
|
376
|
-
expect(tree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);
|
|
377
|
-
expect(tree.attributeNodeId(nodeId)).to.equal(attributionId);
|
|
378
|
-
expect(tree2.attributeNodeId(tree2.convertToNodeId(stableNodeId))).to.equal(attributionId);
|
|
379
|
-
// https://dev.azure.com/fluidframework/internal/_workitems/edit/3347
|
|
380
|
-
const events = testObjectProvider.logger.reportAndClearTrackedEvents();
|
|
381
|
-
expect(events.unexpectedErrors.length).to.equal(1);
|
|
382
|
-
expect(events.unexpectedErrors[0].eventName).to.equal('fluid:telemetry:ContainerRuntime:Outbox:ReferenceSequenceNumberMismatch');
|
|
383
|
-
});
|
|
384
|
-
describe('telemetry', () => {
|
|
385
|
-
const events = [];
|
|
386
|
-
const logger = { send: (event) => events.push(event) };
|
|
387
|
-
beforeEach(() => {
|
|
388
|
-
events.length = 0;
|
|
389
|
-
});
|
|
390
|
-
it('emits RequestVersionUpdate events', () => {
|
|
391
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree({ ...treeOptions, logger });
|
|
392
|
-
const { tree: newerTree } = setUpTestSharedTree({
|
|
393
|
-
containerRuntimeFactory,
|
|
394
|
-
...secondTreeOptions,
|
|
395
|
-
logger,
|
|
396
|
-
});
|
|
397
|
-
newerTree.loadSummary(tree.saveSummary());
|
|
398
|
-
expect(events.some((event) => event.eventName === 'SharedTree:RequestVersionUpdate' &&
|
|
399
|
-
event.versionTo === newVersion &&
|
|
400
|
-
event.versionFrom === oldVersion &&
|
|
401
|
-
event.category === 'generic')).to.equal(true);
|
|
402
|
-
});
|
|
403
|
-
it('emits VersionUpdate events', () => {
|
|
404
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree({ ...treeOptions, logger });
|
|
405
|
-
const { tree: newerTree } = setUpTestSharedTree({
|
|
406
|
-
containerRuntimeFactory,
|
|
407
|
-
...secondTreeOptions,
|
|
408
|
-
logger,
|
|
409
|
-
});
|
|
410
|
-
newerTree.loadSummary(tree.saveSummary());
|
|
411
|
-
const matchesVersionUpdate = (event) => event.eventName === 'SharedTree:VersionUpdate_end' &&
|
|
412
|
-
event.version === newVersion &&
|
|
413
|
-
event.category === 'performance' &&
|
|
414
|
-
typeof event.duration === 'number';
|
|
415
|
-
expect(events.some(matchesVersionUpdate)).to.equal(false);
|
|
416
|
-
containerRuntimeFactory.processAllMessages();
|
|
417
|
-
expect(events.some(matchesVersionUpdate)).to.equal(true);
|
|
418
|
-
});
|
|
419
|
-
it('emits error events on VersionUpdate failure', () => {
|
|
420
|
-
const { tree, containerRuntimeFactory } = setUpTestSharedTree({ ...treeOptions, logger });
|
|
421
|
-
const op = {
|
|
422
|
-
type: SharedTreeOpType.Update,
|
|
423
|
-
version: newVersion,
|
|
424
|
-
};
|
|
425
|
-
containerRuntimeFactory.pushMessage({ contents: op });
|
|
426
|
-
tree.edits.getLocalEdits = () => {
|
|
427
|
-
throw new Error('Simulated issue in update');
|
|
428
|
-
};
|
|
429
|
-
const matchesFailedVersionUpdate = (event) => event.eventName === 'SharedTree:VersionUpdate_cancel' &&
|
|
430
|
-
event.category === 'error' &&
|
|
431
|
-
event.error === 'Simulated issue in update';
|
|
432
|
-
expect(events.some(matchesFailedVersionUpdate)).to.equal(false);
|
|
433
|
-
assert.throws(() => containerRuntimeFactory.processAllMessages(), (e) => validateAssertionError(e, /Simulated issue in update/));
|
|
434
|
-
expect(events.some(matchesFailedVersionUpdate)).to.equal(true);
|
|
435
|
-
});
|
|
436
|
-
});
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
//# sourceMappingURL=SharedTreeVersioningTests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharedTreeVersioningTests.js","sourceRoot":"","sources":["../../../src/test/utilities/SharedTreeVersioningTests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC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AC,IAAI,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,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 'assert';\nimport { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';\nimport { LoaderHeader } from '@fluidframework/container-definitions';\nimport { MockFluidDataStoreRuntime, validateAssertionError } from '@fluidframework/test-runtime-utils';\nimport { expect } from 'chai';\nimport { StableRange, StablePlace, BuildNode, Change } from '../../ChangeTypes.js';\nimport { Mutable } from '../../Common.js';\nimport { EditLog } from '../../EditLog.js';\nimport { areRevisionViewsSemanticallyEqual } from '../../EditUtilities.js';\nimport { SharedTreeDiagnosticEvent } from '../../EventTypes.js';\nimport { NodeId, StableNodeId, TraitLabel } from '../../Identifiers.js';\nimport { SharedTreeOpType, SharedTreeUpdateOp, TreeNodeSequence, WriteFormat } from '../../persisted-types/index.js';\nimport { SharedTree } from '../../SharedTree.js';\nimport { TreeNodeHandle } from '../../TreeNodeHandle.js';\nimport { nilUuid } from '../../UuidUtilities.js';\nimport { applyTestEdits } from '../Summary.tests.js';\nimport { buildLeaf } from './TestNode.js';\nimport {\n\tapplyNoop,\n\tsetUpLocalServerTestSharedTree,\n\tsetUpTestTree,\n\tSharedTreeTestingComponents,\n\tSharedTreeTestingOptions,\n\tspyOnSubmittedOps,\n\ttestTrait,\n\twaitForSummary,\n} from './TestUtilities.js';\n\nfunction spyOnVersionChanges(tree: SharedTree): WriteFormat[] {\n\tconst versions: WriteFormat[] = [];\n\ttree.on(SharedTreeDiagnosticEvent.WriteVersionChanged, (version) => versions.push(version));\n\treturn versions;\n}\n/**\n * Runs a test suite for operations on `SharedTree` that depend on correct versioning.\n * This suite can be used to test other implementations that aim to fulfill `SharedTree`'s contract.\n */\nexport function runSharedTreeVersioningTests(\n\ttitle: string,\n\tsetUpTestSharedTree: (options?: SharedTreeTestingOptions) => SharedTreeTestingComponents\n) {\n\tdescribe(title, () => {\n\t\tconst oldVersion = WriteFormat.v0_0_2;\n\t\tconst newVersion = WriteFormat.v0_1_1;\n\t\tconst treeOptions = { localMode: false, writeFormat: oldVersion };\n\t\tconst secondTreeOptions = {\n\t\t\tid: 'secondTestSharedTree',\n\t\t\tlocalMode: false,\n\t\t\twriteFormat: newVersion,\n\t\t};\n\n\t\tit('defaults to latest version if no version is specified when creating factory', () => {\n\t\t\tconst sharedTree = SharedTree.getFactory().create(new MockFluidDataStoreRuntime(), 'SharedTree');\n\t\t\tconst writeFormats = Object.values(WriteFormat);\n\t\t\texpect(sharedTree.getWriteFormat()).to.equal(writeFormats[writeFormats.length - 1]);\n\t\t});\n\n\t\tit('only processes edit ops if they have the same version', () => {\n\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);\n\t\t\tconst { tree: newerTree } = setUpTestSharedTree({ containerRuntimeFactory, ...secondTreeOptions });\n\n\t\t\texpect(tree.edits.length).to.equal(0);\n\t\t\texpect(newerTree.edits.length).to.equal(0);\n\n\t\t\t// Process an edit\n\t\t\tapplyNoop(tree);\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\n\t\t\t// The newer tree should have ignored the first edit\n\t\t\texpect(tree.edits.length).to.equal(1);\n\t\t\texpect(newerTree.edits.length).to.equal(0);\n\t\t});\n\n\t\tit('resubmits ops concurrent to an update op using the new format', () => {\n\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);\n\t\t\tconst { tree: newerTree } = setUpTestSharedTree({\n\t\t\t\t...treeOptions,\n\t\t\t\tcontainerRuntimeFactory,\n\t\t\t\twriteFormat: newVersion,\n\t\t\t});\n\n\t\t\tconst testTree = setUpTestTree(tree);\n\t\t\tconst rootStableId = testTree.stable.identifier;\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\t\t\tconst summary = tree.saveSummary();\n\t\t\tconst ops = spyOnSubmittedOps(containerRuntimeFactory);\n\t\t\tnewerTree.loadSummary(summary);\n\t\t\ttree.applyEdit(...Change.move(StableRange.only(testTree.left), StablePlace.after(testTree.right)));\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\n\t\t\t// Verify even though one edit was applied, 2 edit ops were sent due to the version upgrade.\n\t\t\texpect(ops.length).to.equal(3);\n\t\t\texpect(ops.map((op) => op.type)).to.eql([\n\t\t\t\tSharedTreeOpType.Update,\n\t\t\t\tSharedTreeOpType.Edit,\n\t\t\t\tSharedTreeOpType.Edit,\n\t\t\t]);\n\n\t\t\texpect(ops[1].version).to.equal(oldVersion);\n\t\t\texpect(ops[2].version).to.equal(newVersion);\n\n\t\t\t// Verify both trees apply the updated op.\n\t\t\tconst handle = new TreeNodeHandle(tree.currentView, tree.convertToNodeId(rootStableId));\n\t\t\texpect(handle.traits[testTree.left.traitLabel]).to.equal(undefined);\n\t\t\texpect(handle.traits[testTree.right.traitLabel].length).to.equal(2);\n\t\t\tconst handle2 = new TreeNodeHandle(newerTree.currentView, newerTree.convertToNodeId(rootStableId));\n\t\t\texpect(handle2.traits[testTree.left.traitLabel]).to.equal(undefined);\n\t\t\texpect(handle2.traits[testTree.right.traitLabel].length).to.equal(2);\n\t\t});\n\n\t\tit('throws if an edit op with a newer version than the write version is received', () => {\n\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);\n\t\t\tconst { tree: newerTree } = setUpTestSharedTree({ containerRuntimeFactory, ...secondTreeOptions });\n\n\t\t\texpect(tree.edits.length).to.equal(0);\n\t\t\texpect(newerTree.edits.length).to.equal(0);\n\n\t\t\t// Process an edit and expect it to throw\n\t\t\tapplyNoop(newerTree);\n\t\t\tassert.throws(\n\t\t\t\t() => containerRuntimeFactory.processAllMessages(),\n\t\t\t\t(e: Error) =>\n\t\t\t\t\tvalidateAssertionError(e, 'Newer op version received by a client that has yet to be updated.')\n\t\t\t);\n\t\t});\n\n\t\tit('ignores duplicate update ops', () => {\n\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);\n\t\t\t// Process an edit\n\t\t\tapplyNoop(tree);\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\n\t\t\tconst summary = tree.saveSummary();\n\n\t\t\t// Load the summary into multiple newer trees to trigger version update ops\n\t\t\tconst { tree: newerTree, containerRuntimeFactory: newerContainerRuntimeFactory } =\n\t\t\t\tsetUpTestSharedTree(secondTreeOptions);\n\t\t\tconst { tree: newerTree2 } = setUpTestSharedTree({\n\t\t\t\tcontainerRuntimeFactory: newerContainerRuntimeFactory,\n\t\t\t\t...secondTreeOptions,\n\t\t\t});\n\t\t\tconst { tree: newerTree3 } = setUpTestSharedTree({\n\t\t\t\tcontainerRuntimeFactory: newerContainerRuntimeFactory,\n\t\t\t\t...secondTreeOptions,\n\t\t\t});\n\n\t\t\tconst versions = spyOnVersionChanges(newerTree);\n\t\t\tconst versions2 = spyOnVersionChanges(newerTree2);\n\t\t\tconst versions3 = spyOnVersionChanges(newerTree3);\n\n\t\t\tnewerTree.loadSummary(summary);\n\t\t\tnewerTree2.loadSummary(summary);\n\t\t\tnewerTree3.loadSummary(summary);\n\t\t\tnewerContainerRuntimeFactory.processAllMessages();\n\n\t\t\t// Each tree should have processed a version update once\n\t\t\texpect(versions).to.deep.equal([oldVersion, newVersion]);\n\t\t\texpect(versions2).to.deep.equal([oldVersion, newVersion]);\n\t\t\texpect(versions3).to.deep.equal([oldVersion, newVersion]);\n\t\t});\n\n\t\tit('maintains custom EditLog and LogViewer callbacks when updating', () => {\n\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\n\t\t\tconst summary = tree.saveSummary();\n\n\t\t\tlet editAdded = 0;\n\n\t\t\t// Load the summary into multiple newer trees to trigger version update ops\n\t\t\tconst { tree: newerTree, containerRuntimeFactory: newerContainerRuntimeFactory } =\n\t\t\t\tsetUpTestSharedTree(secondTreeOptions);\n\n\t\t\tconst versions = spyOnVersionChanges(newerTree);\n\n\t\t\tnewerTree.loadSummary(summary);\n\t\t\t(newerTree.edits as EditLog).registerEditAddedHandler(() => editAdded++);\n\n\t\t\texpect(versions).to.have.length(1);\n\t\t\texpect(versions[0]).to.equal(oldVersion);\n\n\t\t\t// Update occurs after the handler is added to the old edit log\n\t\t\tnewerContainerRuntimeFactory.processAllMessages();\n\t\t\texpect(newerTree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\t\t\texpect(versions).to.have.length(2);\n\t\t\texpect(versions[1]).to.equal(newVersion);\n\n\t\t\tconst additionalEdits = 5;\n\t\t\tfor (let i = 0; i < additionalEdits; i++) {\n\t\t\t\tapplyNoop(newerTree);\n\t\t\t}\n\t\t\tnewerContainerRuntimeFactory.processAllMessages();\n\n\t\t\t// The edit added handler should run twice for each additional edit (once when applying locally and once when applying the sequenced edit)\n\t\t\texpect(editAdded).to.equal(additionalEdits * 2);\n\t\t});\n\n\t\tit('begins writing the new version only after updating', () => {\n\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);\n\t\t\t// Process an edit\n\t\t\tapplyNoop(tree);\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\n\t\t\tconst summary = tree.saveSummary();\n\n\t\t\t// Load the summary into a newer tree to trigger a version update op\n\t\t\tconst { tree: newerTree, containerRuntimeFactory: newerContainerRuntimeFactory } =\n\t\t\t\tsetUpTestSharedTree(secondTreeOptions);\n\n\t\t\tconst ops = spyOnSubmittedOps(newerContainerRuntimeFactory);\n\n\t\t\tnewerTree.loadSummary(summary);\n\t\t\tapplyNoop(newerTree);\n\t\t\tnewerContainerRuntimeFactory.processAllMessages();\n\t\t\texpect(newerTree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\t\t\tapplyNoop(newerTree);\n\n\t\t\texpect(ops.length).to.equal(4);\n\t\t\texpect(ops.map((op) => op.type)).to.eql([\n\t\t\t\tSharedTreeOpType.Update,\n\t\t\t\tSharedTreeOpType.Edit,\n\t\t\t\tSharedTreeOpType.Edit,\n\t\t\t\tSharedTreeOpType.Edit,\n\t\t\t]);\n\t\t\t// Because the first op was submitted before the Update message was sequenced, it should use\n\t\t\t// the same write format as the loaded summary.\n\t\t\texpect(ops[1].version).to.equal(oldVersion);\n\t\t\texpect(ops[2].version).to.equal(newVersion);\n\t\t\texpect(ops[3].version).to.equal(newVersion);\n\t\t});\n\n\t\tit('Existing client can update to a write version higher than the initialized write version', () => {\n\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree(treeOptions);\n\t\t\tconst versions = spyOnVersionChanges(tree);\n\t\t\tconst ops = spyOnSubmittedOps(containerRuntimeFactory);\n\n\t\t\t// Process an edit\n\t\t\tapplyNoop(tree);\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\t\t\tconst summary = tree.saveSummary();\n\n\t\t\t// Load the summary into a newer tree to trigger a version update op\n\t\t\tconst { tree: newerTree } = setUpTestSharedTree({ containerRuntimeFactory, ...secondTreeOptions });\n\t\t\tnewerTree.loadSummary(summary);\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\n\t\t\texpect(tree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\t\t\texpect(newerTree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\n\t\t\t// Apply another arbitrary edit to the initial tree, which should now be using the new write version.\n\t\t\tapplyNoop(tree);\n\n\t\t\texpect(versions).to.eql([newVersion]);\n\t\t\texpect(ops.length).to.equal(3);\n\t\t\texpect(ops.map((op) => op.type)).to.eql([\n\t\t\t\tSharedTreeOpType.Edit,\n\t\t\t\tSharedTreeOpType.Update,\n\t\t\t\tSharedTreeOpType.Edit,\n\t\t\t]);\n\n\t\t\texpect(ops[0].version).to.equal(oldVersion);\n\t\t\texpect(ops[2].version).to.equal(newVersion);\n\t\t});\n\n\t\tit('New client can update to a write version higher than the initialized version on summary load', () => {\n\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree({\n\t\t\t\t...treeOptions,\n\t\t\t\twriteFormat: newVersion,\n\t\t\t});\n\t\t\tconst ops = spyOnSubmittedOps(containerRuntimeFactory);\n\n\t\t\tapplyNoop(tree);\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\t\t\tconst summary = tree.saveSummary();\n\n\t\t\t// Load the summary into a tree with older write version; it should recognize the document is already using\n\t\t\t// the new write version and use that instead.\n\t\t\tconst { tree: olderTree } = setUpTestSharedTree({\n\t\t\t\t...treeOptions,\n\t\t\t\tcontainerRuntimeFactory,\n\t\t\t\twriteFormat: oldVersion,\n\t\t\t});\n\n\t\t\tolderTree.loadSummary(summary);\n\t\t\tapplyNoop(olderTree);\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\n\t\t\texpect(ops.length).to.equal(2);\n\t\t\texpect(ops.map((op) => op.type)).to.eql([SharedTreeOpType.Edit, SharedTreeOpType.Edit]);\n\t\t\texpect(ops.map((op) => op.version)).to.eql([newVersion, newVersion]);\n\t\t});\n\n\t\tit('can load a 0.1.1 summary and access the current view', () => {\n\t\t\t// This is a regression test for the logic initializing SharedTree's EditLog from a summary.\n\t\t\t// The 0.1.1 format omits `currentTree`, but EditLog should still tolerate synchronous access\n\t\t\t// of the first edit in the session (which is a single insert containing that tree).\n\t\t\tconst options: SharedTreeTestingOptions = {\n\t\t\t\twriteFormat: WriteFormat.v0_1_1,\n\t\t\t\tsummarizeHistory: false,\n\t\t\t\tlocalMode: false,\n\t\t\t};\n\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree(options);\n\t\t\tapplyNoop(tree);\n\t\t\tcontainerRuntimeFactory.processAllMessages();\n\t\t\tconst summary = tree.saveSummary();\n\t\t\tconst { tree: newTree } = setUpTestSharedTree({ containerRuntimeFactory, ...options });\n\t\t\tnewTree.loadSummary(summary);\n\t\t\texpect(newTree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\t\t\texpect(() => newTree.currentView).to.not.throw();\n\t\t});\n\n\t\tit('upgrades properly when no edits are sent', async () => {\n\t\t\t// Starts in 0.0.2 (so no upgrade)\n\t\t\tconst { testObjectProvider, tree: tree1 } = await setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_0_2,\n\t\t\t});\n\n\t\t\tconst { tree: tree2 } = await setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_1_1,\n\t\t\t\ttestObjectProvider,\n\t\t\t});\n\n\t\t\texpect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_0_2);\n\t\t\texpect(tree2.getWriteFormat()).to.equal(WriteFormat.v0_0_2);\n\n\t\t\tawait testObjectProvider.ensureSynchronized();\n\n\t\t\texpect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\t\t\texpect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\t\t\texpect(tree1.equals(tree2)).to.be.true;\n\t\t});\n\n\t\tit('generates unique IDs after upgrading from 0.0.2', async () => {\n\t\t\tconst idCount = 100;\n\n\t\t\tconst { testObjectProvider, tree: tree } = await setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_0_2,\n\t\t\t});\n\n\t\t\tapplyTestEdits(tree);\n\n\t\t\tconst nodeIds = new Set<NodeId>();\n\t\t\tconst stableIds = new Set<StableNodeId>();\n\t\t\tfor (let i = 0; i < idCount; i++) {\n\t\t\t\tconst id = tree.generateNodeId();\n\t\t\t\tnodeIds.add(id);\n\t\t\t\tstableIds.add(tree.convertToStableNodeId(id));\n\t\t\t}\n\n\t\t\t// New tree joins, causes an upgrade\n\t\t\tawait setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_1_1,\n\t\t\t\ttestObjectProvider,\n\t\t\t});\n\n\t\t\tawait testObjectProvider.ensureSynchronized();\n\t\t\texpect(tree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\n\t\t\tfor (let i = 0; i < idCount; i++) {\n\t\t\t\t// No IDs should be generated that were already generated before the update\n\t\t\t\tconst id = tree.generateNodeId();\n\t\t\t\texpect(nodeIds.has(id)).to.be.false;\n\t\t\t\texpect(stableIds.has(tree.convertToStableNodeId(id))).to.be.false;\n\t\t\t}\n\t\t\texpect(tree.equals(tree)).to.be.true;\n\t\t});\n\n\t\tit('converts IDs correctly after upgrading from 0.0.2', async () => {\n\t\t\tconst { testObjectProvider, tree: tree1 } = await setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_0_2,\n\t\t\t});\n\n\t\t\tconst idCount = 10;\n\t\t\tconst ids: [NodeId, StableNodeId][] = [];\n\t\t\tfor (let i = 0; i < idCount; i++) {\n\t\t\t\tconst id = tree1.generateNodeId();\n\t\t\t\tids.push([id, tree1.convertToStableNodeId(id)]);\n\t\t\t}\n\n\t\t\t// Use some of the IDs in edits, but leave others unused.\n\t\t\t// They should all be valid and usable after upgrade.\n\t\t\tconst builds: Mutable<TreeNodeSequence<BuildNode>> = [];\n\t\t\tfor (let i = 1; i < ids.length; i += 2) {\n\t\t\t\tbuilds.push(buildLeaf(ids[i][0], i));\n\t\t\t}\n\t\t\ttree1.applyEdit(\n\t\t\t\t...Change.insertTree(\n\t\t\t\t\tbuilds,\n\t\t\t\t\tStablePlace.atEndOf({ parent: tree1.currentView.root, label: 'foo' as TraitLabel })\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tconst { tree: tree2 } = await setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_1_1,\n\t\t\t\ttestObjectProvider,\n\t\t\t\t// To be removed ADO:5464\n\t\t\t\tfeatureGates: {\n\t\t\t\t\t'Fluid.Container.ForceWriteConnection': true,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tawait testObjectProvider.ensureSynchronized();\n\t\t\texpect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\t\t\texpect(tree2.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\n\t\t\tconst view = tree1.currentView;\n\t\t\tfor (let i = 0; i < ids.length; i++) {\n\t\t\t\tconst [nodeIdBefore, stableIdBefore] = ids[i];\n\t\t\t\texpect(tree1.convertToStableNodeId(nodeIdBefore)).to.equal(stableIdBefore);\n\t\t\t\tif (i % 2 === 0) {\n\t\t\t\t\texpect(view.hasNode(nodeIdBefore)).to.be.false;\n\t\t\t\t} else {\n\t\t\t\t\texpect(view.hasNode(nodeIdBefore)).to.be.true;\n\t\t\t\t\tconst node = view.getViewNode(nodeIdBefore);\n\t\t\t\t\texpect(node.payload).to.equal(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\texpect(tree1.equals(tree2)).to.be.true;\n\n\t\t\t// https://dev.azure.com/fluidframework/internal/_workitems/edit/3347\n\t\t\tconst events = testObjectProvider.logger.reportAndClearTrackedEvents();\n\t\t\texpect(events.unexpectedErrors.length).to.equal(1);\n\t\t\texpect(events.unexpectedErrors[0].eventName).to.equal(\n\t\t\t\t'fluid:telemetry:ContainerRuntime:Outbox:ReferenceSequenceNumberMismatch'\n\t\t\t);\n\t\t});\n\n\t\tit('interns strings correctly after upgrading from 0.0.2', async () => {\n\t\t\tconst {\n\t\t\t\ttestObjectProvider,\n\t\t\t\ttree: tree1,\n\t\t\t\tcontainer,\n\t\t\t} = await setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_0_2,\n\t\t\t\tsummarizeHistory: false,\n\t\t\t});\n\n\t\t\tconst internedDefinition = 'internedDefinition';\n\n\t\t\tconst id = tree1.generateNodeId();\n\t\t\ttree1.applyEdit(\n\t\t\t\t...Change.insertTree(\n\t\t\t\t\t{ definition: internedDefinition, identifier: id },\n\t\t\t\t\tStablePlace.atStartOf(testTrait(tree1.currentView))\n\t\t\t\t)\n\t\t\t);\n\t\t\ttree1.applyEdit(Change.delete(StableRange.only(id)));\n\n\t\t\tawait testObjectProvider.ensureSynchronized();\n\t\t\tconst summaryVersion = await waitForSummary(container);\n\n\t\t\tconst { tree: tree2 } = await setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_1_1,\n\t\t\t\ttestObjectProvider,\n\t\t\t\theaders: { [LoaderHeader.version]: summaryVersion },\n\t\t\t});\n\n\t\t\tawait testObjectProvider.ensureSynchronized();\n\t\t\texpect(tree1.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\t\t\texpect(tree2.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\n\t\t\ttree1.applyEdit(\n\t\t\t\t...Change.insertTree(\n\t\t\t\t\t{ definition: internedDefinition, identifier: tree1.generateNodeId() },\n\t\t\t\t\tStablePlace.atStartOf(testTrait(tree1.currentView))\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tawait testObjectProvider.ensureSynchronized();\n\t\t\texpect(areRevisionViewsSemanticallyEqual(tree1.currentView, tree1, tree2.currentView, tree2)).to.be.true;\n\t\t}).timeout(10000);\n\n\t\tit('attributes all pre-upgrade IDs to the nil UUID after upgrading from 0.0.2', async () => {\n\t\t\tconst { testObjectProvider, tree: tree } = await setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_0_2,\n\t\t\t});\n\n\t\t\tconst attributionId = tree.attributionId;\n\t\t\texpect(attributionId).to.equal(nilUuid);\n\t\t\tconst nodeId = tree.generateNodeId();\n\t\t\tconst stableNodeId = tree.convertToStableNodeId(nodeId);\n\n\t\t\ttree.applyEdit(Change.insertTree(buildLeaf(nodeId), StablePlace.atStartOf(testTrait(tree.currentView))));\n\n\t\t\t// New tree joins, causes an upgrade\n\t\t\tconst { tree: tree2 } = await setUpLocalServerTestSharedTree({\n\t\t\t\twriteFormat: WriteFormat.v0_1_1,\n\t\t\t\ttestObjectProvider,\n\t\t\t\t// To be removed ADO:5464\n\t\t\t\tfeatureGates: {\n\t\t\t\t\t'Fluid.Container.ForceWriteConnection': true,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tawait testObjectProvider.ensureSynchronized();\n\t\t\texpect(tree.getWriteFormat()).to.equal(WriteFormat.v0_1_1);\n\t\t\texpect(tree.attributeNodeId(nodeId)).to.equal(attributionId);\n\t\t\texpect(tree2.attributeNodeId(tree2.convertToNodeId(stableNodeId))).to.equal(attributionId);\n\n\t\t\t// https://dev.azure.com/fluidframework/internal/_workitems/edit/3347\n\t\t\tconst events = testObjectProvider.logger.reportAndClearTrackedEvents();\n\t\t\texpect(events.unexpectedErrors.length).to.equal(1);\n\t\t\texpect(events.unexpectedErrors[0].eventName).to.equal(\n\t\t\t\t'fluid:telemetry:ContainerRuntime:Outbox:ReferenceSequenceNumberMismatch'\n\t\t\t);\n\t\t});\n\n\t\tdescribe('telemetry', () => {\n\t\t\tconst events: ITelemetryBaseEvent[] = [];\n\t\t\tconst logger = { send: (event) => events.push(event) };\n\t\t\tbeforeEach(() => {\n\t\t\t\tevents.length = 0;\n\t\t\t});\n\n\t\t\tit('emits RequestVersionUpdate events', () => {\n\t\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree({ ...treeOptions, logger });\n\t\t\t\tconst { tree: newerTree } = setUpTestSharedTree({\n\t\t\t\t\tcontainerRuntimeFactory,\n\t\t\t\t\t...secondTreeOptions,\n\t\t\t\t\tlogger,\n\t\t\t\t});\n\n\t\t\t\tnewerTree.loadSummary(tree.saveSummary());\n\t\t\t\texpect(\n\t\t\t\t\tevents.some(\n\t\t\t\t\t\t(event) =>\n\t\t\t\t\t\t\tevent.eventName === 'SharedTree:RequestVersionUpdate' &&\n\t\t\t\t\t\t\tevent.versionTo === newVersion &&\n\t\t\t\t\t\t\tevent.versionFrom === oldVersion &&\n\t\t\t\t\t\t\tevent.category === 'generic'\n\t\t\t\t\t)\n\t\t\t\t).to.equal(true);\n\t\t\t});\n\n\t\t\tit('emits VersionUpdate events', () => {\n\t\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree({ ...treeOptions, logger });\n\t\t\t\tconst { tree: newerTree } = setUpTestSharedTree({\n\t\t\t\t\tcontainerRuntimeFactory,\n\t\t\t\t\t...secondTreeOptions,\n\t\t\t\t\tlogger,\n\t\t\t\t});\n\n\t\t\t\tnewerTree.loadSummary(tree.saveSummary());\n\t\t\t\tconst matchesVersionUpdate = (event: ITelemetryBaseEvent) =>\n\t\t\t\t\tevent.eventName === 'SharedTree:VersionUpdate_end' &&\n\t\t\t\t\tevent.version === newVersion &&\n\t\t\t\t\tevent.category === 'performance' &&\n\t\t\t\t\ttypeof event.duration === 'number';\n\n\t\t\t\texpect(events.some(matchesVersionUpdate)).to.equal(false);\n\t\t\t\tcontainerRuntimeFactory.processAllMessages();\n\t\t\t\texpect(events.some(matchesVersionUpdate)).to.equal(true);\n\t\t\t});\n\n\t\t\tit('emits error events on VersionUpdate failure', () => {\n\t\t\t\tconst { tree, containerRuntimeFactory } = setUpTestSharedTree({ ...treeOptions, logger });\n\t\t\t\tconst op: SharedTreeUpdateOp = {\n\t\t\t\t\ttype: SharedTreeOpType.Update,\n\t\t\t\t\tversion: newVersion,\n\t\t\t\t};\n\t\t\t\tcontainerRuntimeFactory.pushMessage({ contents: op });\n\t\t\t\t(tree.edits as EditLog).getLocalEdits = () => {\n\t\t\t\t\tthrow new Error('Simulated issue in update');\n\t\t\t\t};\n\t\t\t\tconst matchesFailedVersionUpdate = (event: ITelemetryBaseEvent) =>\n\t\t\t\t\tevent.eventName === 'SharedTree:VersionUpdate_cancel' &&\n\t\t\t\t\tevent.category === 'error' &&\n\t\t\t\t\tevent.error === 'Simulated issue in update';\n\n\t\t\t\texpect(events.some(matchesFailedVersionUpdate)).to.equal(false);\n\t\t\t\tassert.throws(\n\t\t\t\t\t() => containerRuntimeFactory.processAllMessages(),\n\t\t\t\t\t(e: Error) => validateAssertionError(e, /Simulated issue in update/)\n\t\t\t\t);\n\t\t\t\texpect(events.some(matchesFailedVersionUpdate)).to.equal(true);\n\t\t\t});\n\t\t});\n\t});\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Runs a test suite for summary load perf on `SharedTree`.
|
|
7
|
-
* This suite can be used to test other implementations that aim to fulfill `SharedTree`'s contract.
|
|
8
|
-
*/
|
|
9
|
-
export declare function runSummaryLoadPerfTests(title: string): void;
|
|
10
|
-
//# sourceMappingURL=SummaryLoadPerfTests.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryLoadPerfTests.d.ts","sourceRoot":"","sources":["../../../src/test/utilities/SummaryLoadPerfTests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAiC3D"}
|