* Fixed race condition caused by trying to handle asset ready event before asset container has finished filling out all the data structures.
Added check to only handle asset ready once init is complete
Added unit test to verify fix
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Re-enable test
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add missing space to error message
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add comment on sleep
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Collapse nested namespace
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Collapse nested namespace
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add interface to allow disabling global AZ Core test environment trace bus suppression
Update BaseAssetManagerTest class to disable the suppression by default
Update specific asset manager tests that rely on the trace bus suppression to ReEnable it
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Remove nodiscard
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Remove unique_ptr for disable token
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix move operator
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Switch to having individual flags for suppression of each type of output
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Add cvar to force stacktrace output.
Clean up whitespace
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Fix race condition where asset would finish loading and another request would start before the streamer request could be cleared
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Re-enable disabled test which was failing for the same reason.
Fix test timeout which was way too long.
Reduce test iterations to keep test time safely under 5 seconds.
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* Instead of using a mutex, re-order the statements to remove the streamer request first
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
* fixes some warnings for newer versions of VS2022
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* more warning fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* remove integ test filters from AzTest
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* remove integ test handling from AzTestRunner
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* changes integ tests of gridmate to regular tests and disables failing ones
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* removes the Integ from the EMotionFX tests, but leaves them disabled since they are failing
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* removes the Integ from the HttpRequestor tests and disables it since is not passing
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* changing integ tests for DISABLED, these ones are using files that are not there
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* fixes linux build
gridmate tests that were Integ are now disabled
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* fixes linux warnings
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Removed ununeeded includes from EBus EBus.h and Policies.h
Updated the locations which needed those includes
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding missing include for <memory> to AWsClientAuthBus.h
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Remove the while true loop in the EBusQueuePolicy Execute() function
The while true loop in Execute was for allowing additional functions to be queued in the middle of execution of current list of functions.
That functionality was dangerous, because if a queued function added itself during execution unconditionally, then it would result in an infinite loop
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the AssetManager::DispatchEvents function to pump the AssetBus event queue until empty
Queued Events on the AssetBus is able to queue additional events on that Bus during execution of those events.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Changed the AssetManager::DispatchEvents function to only execute the
AssetBus queued events once
Changed the AssetJobsFloodTest.AssetWithNoLoadReference_LoadDependencies_BehaviorObeyed test to dispatch events until the OnAssetContainerReady callback is signaled.
This happens after every asset load to make sure that the
expiring AssetContainer instances are removed from `AssetManager::m_ownedAssetContainer` container before retrying to load the same asset.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added a MaxTimeoutSeconds constant for the maximum amount of the time to run a single DispatchEvents loop
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Modernization + small fix.
Modernize ( `bool`/`override`/other) code in AzCore, AzFramework, AzQtComponents, AzToolsFramework, etc.
Replaced a `bind` or two, use `using` in a few places as well.
Fix nullptr comparison of AZStd::function.
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Apply review-based changes
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
* Add missing RTTI include to fix non-unity build error
* Add missing includes that were automatically added as part of unity builds
Signed-off-by: Steve Pham <spham@amazon.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>
The AssetContainer was getting "stuck" in the case that it tried to load a missing asset that was already registered with the AssetManager as missing. This fixes the bug, as well as adding a unit test for the specific condition.
The AssetContainer was getting "stuck" in the case that it tried to load a missing asset that was already registered with the AssetManager as missing. This fixes the bug, as well as adding a unit test for the specific condition.
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.