Skip to content

Commit

Permalink
update to use zero wait on playback (#22066)
Browse files Browse the repository at this point in the history
* update to use zero wait on playback

* update resourcemanager ci to run when shared files change

* one more mgmt shared folder
  • Loading branch information
m-nash authored Jun 23, 2021
1 parent 3fe389d commit 60d9525
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;

namespace Azure.ResourceManager.TestFramework
Expand All @@ -32,12 +33,24 @@ protected ManagementRecordedTestBase(bool isAsync) : base(isAsync)
{
SessionEnvironment = new TEnvironment();
SessionEnvironment.Mode = Mode;
Initialize();
}

protected ManagementRecordedTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode)
{
SessionEnvironment = new TEnvironment();
SessionEnvironment.Mode = Mode;
Initialize();
}

private void Initialize()
{
if (Mode == RecordedTestMode.Playback)
{
var opInternalType = typeof(OperationInternals);
var pollField = opInternalType.GetField("<DefaultPollingInterval>k__BackingField", BindingFlags.Static | BindingFlags.NonPublic);
pollField.SetValue(null, TimeSpan.Zero);
}
}

private ArmClient GetCleanupClient()
Expand Down
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
All should have PrivateAssets="All" set so they don't become pacakge dependencies
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20210621.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20210622.3" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20210601.1" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />
Expand Down
2 changes: 2 additions & 0 deletions sdk/resourcemanager/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ pr:
paths:
include:
- sdk/resourcemanager/
- common/ManagementTestShared/
- common/ManagementCoreShared/

extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
Expand Down

0 comments on commit 60d9525

Please sign in to comment.