From abed7d9c80073dde103af4a3b1f1daa7bccb9cdb Mon Sep 17 00:00:00 2001 From: Brent Rusinow <44413020+brrusino@users.noreply.github.com> Date: Wed, 4 Jan 2023 10:45:15 -0800 Subject: [PATCH] refactored test base to handle playback mode (#33283) --- .../tests/ChaosManagementTestBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/tests/ChaosManagementTestBase.cs b/sdk/chaos/Azure.ResourceManager.Chaos/tests/ChaosManagementTestBase.cs index 08c64f664d1f7..fed58ad01ac05 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/tests/ChaosManagementTestBase.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/tests/ChaosManagementTestBase.cs @@ -70,6 +70,10 @@ protected async Task Initialize() /// public int CreateVmssId() { + if (this.Mode == RecordedTestMode.Playback) + { + return this.IsAsync ? 5 : 4; + } var framework = RuntimeInformation.FrameworkDescription; if (framework.IndexOf(TestConstants.DotNetFrameworkName, StringComparison.OrdinalIgnoreCase) != -1) {