Refactor stress test files for improved readability and functionality

- Simplified the reify stress test by consolidating the reifyInstance call into a single line for better clarity.
- Added a cleanup function in the stressPatterns test to manage knownIds, ensuring that IDs of destroyed instances are removed.
- Enhanced the logic for adding, removing, and updating instances in the stressPatterns test to verify the existence of parent and child instances before operations, improving test robustness.
- Reformatted code in LargeTreeGenerator and MockApiContext for consistency and readability.
This commit is contained in:
Joe 2026-02-01 22:10:18 -06:00
parent 01110fc916
commit d513ab16c0
4 changed files with 48 additions and 31 deletions

View file

@ -527,13 +527,8 @@ return function()
local startTime = os.clock()
local deferredRefs = {}
local unappliedPatch = reifyInstance(
deferredRefs,
instanceMap,
treeData.virtualInstances,
treeData.rootId,
container
)
local unappliedPatch =
reifyInstance(deferredRefs, instanceMap, treeData.virtualInstances, treeData.rootId, container)
applyDeferredRefs(instanceMap, deferredRefs, unappliedPatch)
local elapsed = os.clock() - startTime