Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test | Skip unsupported tests on Synapse #1884

Merged
merged 1 commit into from
Jan 11, 2023
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 @@ -8,8 +8,9 @@ public static class TransactionPoolTest
/// <summary>
/// Tests if connections in a distributed transaction are put into a transaction pool. Also checks that clearallpools
/// does not clear transaction connections and that the transaction root is put into "stasis" when closed
/// Synapse: only supports local transaction request.
/// </summary>
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))]
[ClassData(typeof(ConnectionPoolConnectionStringProvider))]
public static void BasicTransactionPoolTest(string connectionString)
{
Expand Down Expand Up @@ -63,9 +64,10 @@ public static void BasicTransactionPoolTest(string connectionString)

/// <summary>
/// Checks that connections in the transaction pool are not cleaned out, and the root transaction is put into "stasis" when it ages
/// Synapse: only supports local transaction request.
/// </summary>
/// <param name="connectionString"></param>
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))]
[ClassData(typeof(ConnectionPoolConnectionStringProvider))]
public static void TransactionCleanupTest(string connectionString)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ public class DataReaderCancellationTest
/// <summary>
/// Test ensures cancellation token is registered before ReadAsync starts processing results from TDS Stream,
/// such that when Cancel is triggered, the token is capable of canceling reading further results.
/// Synapse: Incompatible query.
/// </summary>
/// <returns>Async Task</returns>
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))]
public static async Task CancellationTokenIsRespected_ReadAsync()
{
const string longRunningQuery = @"
Expand Down Expand Up @@ -49,9 +50,10 @@ await Assert.ThrowsAsync<TaskCanceledException>(async () =>
/// <summary>
/// Test ensures cancellation token is registered before ReadAsync starts processing results from TDS Stream,
/// such that when Cancel is triggered, the token is capable of canceling reading further results.
/// Synapse: Incompatible query & Parallel query execution on the same connection is not supported.
/// </summary>
/// <returns>Async Task</returns>
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))]
public static async Task CancelledCancellationTokenIsRespected_ReadAsync()
{
const string longRunningQuery = @"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ public static async Task GetFieldValueAsync_Char_OfTextReader(CommandBehavior be
Assert.Equal(originalText, outputText);
}

[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
// Synapse: Cannot find data type 'XML'.
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))]
[MemberData(nameof(GetCommandBehavioursAndIsAsync))]
public static async void GetFieldValue_OfXmlReader(CommandBehavior behavior, bool isExecuteAsync)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ public static void MARSSyncTimeoutTest()
}
}
#endif

[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
// Synapse: Parallel query execution on the same connection is not supported.
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsNotAzureSynapse))]
public static async Task MARSAsyncBusyReaderTest()
{
using SqlConnection con = new(_connStr);
Expand Down