Skip to content

Commit

Permalink
Fix Bulk Copy Json tests (#2918)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheenamalhotra authored Oct 22, 2024
1 parent 337a18f commit 576de46
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class JsonBulkCopyTest
private readonly ITestOutputHelper _output;
private static readonly string _jsonFile = "randomRecords.json";
private static readonly string _outputFile = "serverRecords.json";
private static readonly bool _isTestEnabled = DataTestUtility.IsJsonSupported;

public JsonBulkCopyTest(ITestOutputHelper output)
{
Expand Down Expand Up @@ -237,18 +236,13 @@ private async Task BulkCopyDataAsync(CommandBehavior cb, bool enableStraming)
}
}

[Theory]
[InlineData(CommandBehavior.Default, false)]
[InlineData(CommandBehavior.Default, true)]
[InlineData(CommandBehavior.SequentialAccess, false)]
[InlineData(CommandBehavior.SequentialAccess, true)]
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.IsJsonSupported))]
public void TestJsonBulkCopy(CommandBehavior cb, bool enableStraming)
{
if (!_isTestEnabled)
{
return;
}

PopulateData(10000);
using (SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString))
{
Expand All @@ -261,17 +255,13 @@ public void TestJsonBulkCopy(CommandBehavior cb, bool enableStraming)
}
}

[Theory]
[InlineData(CommandBehavior.Default, false)]
[InlineData(CommandBehavior.Default, true)]
[InlineData(CommandBehavior.SequentialAccess, false)]
[InlineData(CommandBehavior.SequentialAccess, true)]
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.IsJsonSupported))]
public async Task TestJsonBulkCopyAsync(CommandBehavior cb, bool enableStraming)
{
if (!_isTestEnabled)
{
return;
}
PopulateData(10000);
using (SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString))
{
Expand Down

0 comments on commit 576de46

Please sign in to comment.