Merge pull request #901 from aws-lumberyard-dev/MultiplayerPipeline
SPEC-6984 Fixed flaky test when user settings were written by Compone…
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <AzCore/UnitTest/UnitTest.h>
|
||||
#include <AzCore/UserSettings/UserSettingsComponent.h>
|
||||
#include <AzQtComponents/Utilities/QtPluginPaths.h>
|
||||
#include <AzTest/AzTest.h>
|
||||
#include <AzTest/GemTestEnvironment.h>
|
||||
@@ -39,6 +40,15 @@ namespace Multiplayer
|
||||
|
||||
AddComponentDescriptors(descriptors);
|
||||
}
|
||||
|
||||
/// Allows derived environments to override to perform additional steps after the system entity is activated.
|
||||
void PostSystemEntityActivate() override
|
||||
{
|
||||
// Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is
|
||||
// shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash
|
||||
// in the unit tests.
|
||||
AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize);
|
||||
}
|
||||
};
|
||||
} // namespace UnitTest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user