[LYN-3464] Vegetation unit tests intermittently failed due to an AssetManager bug. Inside the AssetContainer, if the root asset finished loading during the container initialization, the CheckReady() call at the end of initialization would detect the loaded asset, but would skip sending out notifications because the initialized flag wasn't set yet. This would lead to an extra asset reference remaining in the AssetManager itself, would would then cause errors when the asset handler for that asset got removed.
By setting the initialization flag before the CheckReady() call, the notifications get sent correctly, and no extra asset references remain. This checkin also includes a unit test for the AssetManager that specifically forces this condition to happen and validates that it works correctly.
This commit is contained in:
@@ -275,7 +275,7 @@ namespace UnitTest
|
||||
}
|
||||
|
||||
// [SPEC-6600] This test intermittently fails on automated builds, so disabling temporarily until root cause identified
|
||||
TEST_F(DynamicSliceInstanceSpawnerTests, DISABLED_DifferentSpawnersAreNotEqual)
|
||||
TEST_F(DynamicSliceInstanceSpawnerTests, DifferentSpawnersAreNotEqual)
|
||||
{
|
||||
// Two spawners with different data should *not* be data-equivalent.
|
||||
|
||||
@@ -291,7 +291,7 @@ namespace UnitTest
|
||||
|
||||
// [LY-118267] This test intermittently fails on automated builds, so disabling temporarily until the root cause
|
||||
// can be identified
|
||||
TEST_F(DynamicSliceInstanceSpawnerTests, DISABLED_LoadAndUnloadAssets)
|
||||
TEST_F(DynamicSliceInstanceSpawnerTests, LoadAndUnloadAssets)
|
||||
{
|
||||
// The spawner should successfully load/unload assets without errors.
|
||||
|
||||
@@ -312,7 +312,7 @@ namespace UnitTest
|
||||
}
|
||||
|
||||
// [SPEC-6600] This test intermittently fails on automated builds, so disabling temporarily until root cause identified
|
||||
TEST_F(DynamicSliceInstanceSpawnerTests, DISABLED_CreateAndDestroyInstance)
|
||||
TEST_F(DynamicSliceInstanceSpawnerTests, CreateAndDestroyInstance)
|
||||
{
|
||||
// The spawner should successfully create and destroy an instance without errors.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user