diff --git a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp index 34b6918400..9208294a32 100644 --- a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp +++ b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp @@ -594,13 +594,13 @@ namespace UnitTest DebugListener listener; auto assetUuids = { MyAsset1Id, - //MyAsset2Id, - //MyAsset3Id, + MyAsset2Id, + MyAsset3Id, }; AZStd::vector threads; AZStd::mutex mutex; - AZStd::atomic threadCount((int)assetUuids.size()); + AZStd::atomic threadCount(static_cast(assetUuids.size())); AZStd::condition_variable cv; AZStd::atomic_bool keepDispatching(true); @@ -618,10 +618,13 @@ namespace UnitTest threads.emplace_back([this, &threadCount, &cv, assetUuid]() { bool checkLoaded = true; - for (int i = 0; i < 1000; i++) + for (int i = 0; i < 5000; i++) { Asset asset1 = m_testAssetManager->GetAsset(assetUuid, azrtti_typeid(), AZ::Data::AssetLoadBehavior::PreLoad); + AZ::Debug::Trace::Output("", AZStd::string::format("Got ref from GetAsset: %s. Will block: %s\n", + asset1.GetId().ToString().c_str(), + checkLoaded ? "Yes" : "No").c_str()); if (checkLoaded) { @@ -633,7 +636,7 @@ namespace UnitTest checkLoaded = !checkLoaded; } - threadCount--; + --threadCount; cv.notify_one(); }); }