Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3122,7 +3122,7 @@ public class PipelineJsonSamples : JsonSampleCollection<PipelineJsonSamples>
},
enableSkipIncompatibleRow: true,
parallelCopies: 32,
cloudDataMovementUnits: 16,
dataIntegrationUnits: 16,
enableSkipIncompatibleRow: true,
redirectIncompatibleRowSettings: {
linkedServiceName: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public async Task SsisAzureIntegrationRuntimeScenarioTest()
NodeSize = "Standard_D1_v2",
MaxParallelExecutionsPerNode = 1,
NumberOfNodes = 1,
Location = "eastUS"
Location = "WestUS"
},
SsisProperties = new IntegrationRuntimeSsisProperties
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using DataFactory.Tests.Utils;
using Microsoft.Azure.Management.DataFactory;
using Microsoft.Azure.Management.DataFactory.Models;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
using Microsoft.Rest.Azure;
using System;
using System.Net;
using System.Threading.Tasks;
Expand All @@ -22,12 +22,12 @@ public async Task CancelPipelineRun()
Func<DataFactoryManagementClient, Task> action = async (client) =>
{
Factory createResponse = client.Factories.CreateOrUpdate(this.ResourceGroupName, this.DataFactoryName, new Factory(location: FactoryLocation));
ErrorResponseException exception = await Assert.ThrowsAsync<ErrorResponseException>(async () =>
CloudException exception = await Assert.ThrowsAsync<CloudException>(async () =>
{
await client.Factories.CancelPipelineRunWithHttpMessagesAsync(this.ResourceGroupName, this.DataFactoryName, "efbe5443-9879-4495-94a6-4d7c394133ad");
await client.PipelineRuns.CancelWithHttpMessagesAsync(this.ResourceGroupName, this.DataFactoryName, "efbe5443-9879-4495-94a6-4d7c394133ad");
});

Assert.Equal(exception.Response.StatusCode, HttpStatusCode.BadRequest);
Assert.Equal(HttpStatusCode.BadRequest, exception.Response.StatusCode);
};

Func<DataFactoryManagementClient, Task> finallyAction = async (client) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static PipelineResource GetPipelineResource(string description, string da
CopyActivity copyActivity = new CopyActivity
{
Name = "ExampleCopyActivity",
DataIntegrationUnits = 32,
Inputs = new List<DatasetReference>
{
new DatasetReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Azure.Management.ResourceManager;
using Microsoft.Azure.Management.ResourceManager.Models;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
using Microsoft.Azure.Test.HttpRecorder;
using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
Expand All @@ -17,7 +18,7 @@ public abstract class ScenarioTestBase<T>
{
private const string ResourceGroupNamePrefix = "sdktestingadfrg";
protected const string DataFactoryNamePrefix = "sdktestingfactory";
protected const string FactoryLocation = "East US 2";
protected const string FactoryLocation = "West US";
protected static string ClassName = typeof(T).FullName;

protected string ResourceGroupName { get; private set; }
Expand All @@ -27,9 +28,16 @@ public abstract class ScenarioTestBase<T>

protected async Task RunTest(Func<DataFactoryManagementClient, Task> initialAction, Func<DataFactoryManagementClient, Task> finallyAction, [CallerMemberName] string methodName = "")
{
Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback");
const string modeEnvironmentVariableName = "AZURE_TEST_MODE";
const string playback = "Playback";

using (MockContext mockContext = MockContext.Start(ClassName, methodName))
{
string mode = Environment.GetEnvironmentVariable(modeEnvironmentVariableName);
if (mode != null && mode.Equals(playback, StringComparison.OrdinalIgnoreCase))
{
HttpMockServer.Mode = HttpRecorderMode.Playback;
}
this.ResourceGroupName = TestUtilities.GenerateName(ResourceGroupNamePrefix);
this.DataFactoryName = TestUtilities.GenerateName(DataFactoryNamePrefix);
this.Client = mockContext.GetServiceClient<DataFactoryManagementClient>(TestEnvironmentFactory.GetTestEnvironment());
Expand Down
Loading