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

Tests | Activate "ActiveIssue" tests #3012

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
aef7d06
Use Assert.Throws instead of home-grown
MichelZ Nov 18, 2024
d14975e
TestConnectionStateWithErrorClass20 on NET8 fails on Debug build with…
MichelZ Nov 18, 2024
0cd7a63
Activate SqlExceptionTest, they seem to work fine now on Linux
MichelZ Nov 18, 2024
86bcc0c
Activate WeakRefTestYukonSpecific, it runs fine on Linux
MichelZ Nov 18, 2024
6f3f107
Activate IntegratedAuthenticationTest, it runs fine
MichelZ Nov 18, 2024
d614b58
Activate LocalDBTest, make sure Local DB is present. They run fine
MichelZ Nov 18, 2024
c810732
Activate reliability tests, they run fine
MichelZ Nov 18, 2024
8ca44b9
Activate Credential Tests, they seem to work fine
MichelZ Nov 18, 2024
f854d0e
Activate CommandCancel tests, add Conditions to existing issue
MichelZ Nov 18, 2024
241a241
Activate Udt tests, they seem to work fine
MichelZ Nov 18, 2024
f1765a2
Activate PacketNumberWraparound test, it works fine
MichelZ Nov 18, 2024
a0844a8
Improve certificate tests by checking IsAdmin outside the constructor
MichelZ Nov 18, 2024
8a83e20
- Remove AsyncTest (why would Async be faster than Sync?)
MichelZ Nov 18, 2024
4c0448b
Fix spelling
MichelZ Nov 18, 2024
8b9a806
Fix grammatical errors
MichelZ Nov 18, 2024
8fb9d0b
Revert unintended change
MichelZ Nov 18, 2024
968a33c
Merge branch 'pr/enable-activeissue-tests' of https://github.com/Mich…
MichelZ Nov 18, 2024
55f88dd
Use Close instead of Dispose, as Dispose swallows the exception
MichelZ Nov 24, 2024
1abcedb
Remove comment about IPv6 & Cert as this now works in NET8+
MichelZ Nov 24, 2024
e4c7165
Do not run XEvent test on azure
MichelZ Nov 24, 2024
3317cbc
The rest of the tests run fine on Azure
MichelZ Nov 24, 2024
4a4f407
Fix azure check
MichelZ Nov 24, 2024
86eb7aa
Disable more tests for Azure
MichelZ Nov 25, 2024
8e3af02
Also disable named instances
MichelZ Nov 25, 2024
fcce097
Remove ExectueXmlReaderTest on ARM
MichelZ Nov 25, 2024
968e884
Disable tests with proxy for azure
MichelZ Nov 25, 2024
7dae71a
Merge branch 'main' into pr/enable-activeissue-tests
MichelZ Nov 26, 2024
57d4a5e
Add data ordering to queries
MichelZ Nov 27, 2024
caf6a5b
Enable test on ARM
MichelZ Nov 27, 2024
c66230c
Remove whitespace
MichelZ Nov 27, 2024
b4d1a79
Formatting
MichelZ Nov 27, 2024
6aa1dc7
Merge branch 'main' into pr/enable-activeissue-tests
MichelZ Nov 27, 2024
1034f92
Restore newline
MichelZ Dec 3, 2024
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 @@ -15,5 +15,4 @@
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="$(SystemRuntimeInteropServicesRuntimeInformationVersion)" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="$(SystemSecurityCryptographyPkcsVersion)" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public class SqlExceptionTest
private const string badServer = "92B96911A0BD43E8ADA4451031F7E7CF";

[Fact]
[ActiveIssue("12161", TestPlatforms.AnyUnix)]
public void SerializationTest()
{
SqlException e = CreateException();
Expand All @@ -26,7 +25,6 @@ public void SerializationTest()
TypeNameHandling = TypeNameHandling.All,
};

// TODO: Deserialization fails on Unix with "Member 'ClassName' was not found."
var sqlEx = JsonConvert.DeserializeObject<SqlException>(json, settings);

Assert.Equal(e.ClientConnectionId, sqlEx.ClientConnectionId);
Expand All @@ -35,8 +33,7 @@ public void SerializationTest()

#if NETFRAMEWORK
[Fact]
[ActiveIssue("12161", TestPlatforms.AnyUnix)]
public static void SqlExcpetionSerializationTest()
public static void SqlExceptionSerializationTest()
{
var formatter = new BinaryFormatter();
SqlException e = CreateException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted
[PlatformSpecific(TestPlatforms.Windows)]
public class CspProviderExt
{
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringSetupForAE))]
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringSetupForAE), nameof(DataTestUtility.IsAdmin))]
[ClassData(typeof(AEConnectionStringProvider))]
public void TestKeysFromCertificatesCreatedWithMultipleCryptoProviders(string connectionString)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static class DataTestUtility
//SQL Server EngineEdition
private static string s_sqlServerEngineEdition;

// JSON Coloumn type
// JSON Column type
public static readonly bool IsJsonSupported = false;

// Azure Synapse EngineEditionId == 6
Expand All @@ -107,8 +107,8 @@ public static bool IsAzureSynapse
{
s_sqlServerEngineEdition ??= GetSqlServerProperty(TCPConnectionString, "EngineEdition");
}
_ = int.TryParse(s_sqlServerEngineEdition, out int engineEditon);
return engineEditon == 6;
_ = int.TryParse(s_sqlServerEngineEdition, out int engineEdition);
return engineEdition == 6;
}
}

Expand Down Expand Up @@ -234,6 +234,16 @@ static DataTestUtility()
}
}

public static IEnumerable<object[]> GetConnectionStringsWithEnclaveMemberData()
{
return GetConnectionStrings(true).Select(x => new object[] { x });
}

public static IEnumerable<object[]> GetConnectionStringsWithoutEnclaveMemberData()
{
return GetConnectionStrings(false).Select(x => new object[] { x });
}

public static IEnumerable<string> ConnectionStrings => GetConnectionStrings(withEnclave: true);

public static IEnumerable<string> GetConnectionStrings(bool withEnclave)
Expand Down Expand Up @@ -457,6 +467,11 @@ public static bool IsNotAzureServer()
return !AreConnStringsSetup() || !Utils.IsAzureSqlServer(new SqlConnectionStringBuilder((TCPConnectionString)).DataSource);
}

public static bool IsNotNamedInstance()
{
return !AreConnStringsSetup() || !new SqlConnectionStringBuilder(TCPConnectionString).DataSource.Contains(@"\");
}

// Synapse: Always Encrypted is not supported with Azure Synapse.
// Ref: https://feedback.azure.com/forums/307516-azure-synapse-analytics/suggestions/17858869-support-always-encrypted-in-sql-data-warehouse
public static bool IsAKVSetupAvailable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,12 @@
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup Condition="'$(TestSet)' == '' or '$(TestSet)' == 'AE'">
<Compile Include="AlwaysEncrypted\CoreCryptoTests.cs" />
<Compile Include="AlwaysEncrypted\ConversionTests.cs" />
<Compile Include="AlwaysEncrypted\ExceptionsGenericError.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\CryptoVector.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\CryptoNativeBaselineReader.cs" />
<Compile Include="AlwaysEncrypted\TestTrustedMasterKeyPaths.cs" />
<Content Include="AlwaysEncrypted\TestFixtures\Setup\TCECryptoNativeBaseline.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>TCECryptoNativeBaseline.txt</Link>
</Content>
<Content Include="AlwaysEncrypted\TestFixtures\Setup\TCECryptoNativeBaselineRsa.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>TCECryptoNativeBaselineRsa.txt</Link>
</Content>
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true' AND ('$(TestSet)' == '' OR '$(TestSet)' == 'AE')">
<Compile Include="AlwaysEncrypted\CspProviderExt.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\CertificateUtilityWin.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\CspProviderColumnMasterKey.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\SQLSetupStrategyCspExt.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TestSet)' == '' OR '$(TestSet)' == 'AE'">
<Compile Include="AlwaysEncrypted\AKVTests.cs" />
<Compile Include="AlwaysEncrypted\AKVUnitTests.cs" />
<Compile Include="AlwaysEncrypted\CoreCryptoTests.cs" />
<Compile Include="AlwaysEncrypted\ConversionTests.cs" />
<Compile Include="AlwaysEncrypted\EnclaveAzureDatabaseTests.cs" />
<Compile Include="AlwaysEncrypted\ExceptionsGenericError.cs" />
<Compile Include="AlwaysEncrypted\ExceptionTestAKVStore.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\AKVTestTable.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\AkvColumnMasterKey.cs" />
Expand All @@ -57,6 +38,8 @@
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\BulkCopyAEErrorMessageTestTable.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\BulkCopyTruncationTables.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\ColumnDecryptErrorTestTable.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\CryptoVector.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\CryptoNativeBaselineReader.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\DateOnlyTestTable.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\SqlNullValuesTable.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\SqlParameterPropertiesTable.cs" />
Expand All @@ -70,6 +53,21 @@
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\DummyKeyStoreProvider.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\DummyProviderMasterKey.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\CertificateUtility.cs" />
<Content Include="AlwaysEncrypted\TestFixtures\Setup\TCECryptoNativeBaseline.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>TCECryptoNativeBaseline.txt</Link>
</Content>
<Content Include="AlwaysEncrypted\TestFixtures\Setup\TCECryptoNativeBaselineRsa.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>TCECryptoNativeBaselineRsa.txt</Link>
</Content>
<Compile Include="AlwaysEncrypted\TestTrustedMasterKeyPaths.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true' AND ('$(TestSet)' == '' OR '$(TestSet)' == 'AE')">
MichelZ marked this conversation as resolved.
Show resolved Hide resolved
<Compile Include="AlwaysEncrypted\CspProviderExt.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\CertificateUtilityWin.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\Setup\CspProviderColumnMasterKey.cs" />
<Compile Include="AlwaysEncrypted\TestFixtures\SQLSetupStrategyCspExt.cs" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0')) AND ('$(TestSet)' == '' OR '$(TestSet)' == 'AE')">
<Compile Include="AlwaysEncrypted\DateOnlyReadTests.cs" />
Expand All @@ -79,7 +77,6 @@
<Compile Include="SQL\AsyncTest\BeginExecAsyncTest.cs" />
<Compile Include="SQL\AsyncTest\BeginExecReaderAsyncTest.cs" />
<Compile Include="SQL\AsyncTest\XmlReaderAsyncTest.cs" />
<Compile Include="SQL\AsyncTest\AsyncTest.cs" />
<Compile Include="SQL\AsyncTest\AsyncCancelledConnectionsTest.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TestSet)' == '' OR '$(TestSet)' == '2'">
Expand Down Expand Up @@ -173,15 +170,21 @@
<Compile Include="DDBasics\DDAsyncTest\DDAsyncTest.cs" />
<Compile Include="DDBasics\DDDataTypesTest\DDDataTypesTest.cs" />
<Compile Include="DDBasics\DDMARSTest\DDMARSTest.cs" />
<Compile Include="Json\SqlJsonTest.cs" />
<Compile Include="ProviderAgnostic\MultipleResultsTest\MultipleResultsTest.cs" />
<Compile Include="ProviderAgnostic\ReaderTest\ReaderTest.cs" />
<Compile Include="TracingTests\EventSourceTest.cs" />
<Compile Include="SQL\AADFedAuthTokenRefreshTest\AADFedAuthTokenRefreshTest.cs" />
<Compile Include="SQL\ConnectionTestWithSSLCert\CertificateTest.cs" />
<Compile Include="SQL\ConnectionTestWithSSLCert\CertificateTestWithTdsServer.cs" />
<Compile Include="SQL\ConnectionPoolTest\ConnectionPoolTest.cs" />
<Compile Include="SQL\ConnectionPoolTest\PoolBlockPeriodTest.cs" />
<Compile Include="SQL\DataSourceParserTest\DataSourceParserTest.cs" />
<Compile Include="SQL\InstanceNameTest\InstanceNameTest.cs" />
<Compile Include="SQL\IntegratedAuthenticationTest\IntegratedAuthenticationTest.cs" />
<Compile Include="SQL\JsonTest\JsonBulkCopyTest.cs" />
<Compile Include="SQL\JsonTest\JsonStreamTest.cs" />
<Compile Include="SQL\JsonTest\JsonTest.cs" />
<Compile Include="SQL\KerberosTests\KerberosTest.cs" />
<Compile Include="SQL\KerberosTests\KerberosTicketManager\KerberosTicketManager.cs" />
<Compile Include="SQL\LocalDBTest\LocalDBTest.cs" />
Expand All @@ -193,6 +196,7 @@
<Compile Include="SQL\SqlCommand\SqlCommandCompletedTest.cs" />
<Compile Include="SQL\SqlCommand\SqlCommandCancelTest.cs" />
<Compile Include="SQL\SqlCommand\SqlCommandSetTest.cs" />
<Compile Include="SQL\SqlCommand\SqlCommandStoredProcTest.cs" />
<Compile Include="SQL\SqlCredentialTest\SqlCredentialTest.cs" />
<Compile Include="SQL\SqlDependencyTest\SqlDependencyTest.cs" />
<Compile Include="SQL\SqlFileStreamTest\SqlFileStreamTest.cs" />
Expand Down Expand Up @@ -293,12 +297,6 @@
<Compile Include="SQL\Common\SystemDataInternals\FedAuthTokenHelper.cs" />
<Compile Include="SQL\Common\SystemDataInternals\TdsParserHelper.cs" />
<Compile Include="SQL\Common\SystemDataInternals\TdsParserStateObjectHelper.cs" />
<Compile Include="SQL\ConnectionTestWithSSLCert\CertificateTest.cs" />
<Compile Include="SQL\ConnectionTestWithSSLCert\CertificateTestWithTdsServer.cs" />
<Compile Include="SQL\JsonTest\JsonBulkCopyTest.cs" />
<Compile Include="SQL\JsonTest\JsonStreamTest.cs" />
<Compile Include="SQL\JsonTest\JsonTest.cs" />
<Compile Include="SQL\SqlCommand\SqlCommandStoredProcTest.cs" />
<Compile Include="TracingTests\TestTdsServer.cs" />
<Compile Include="XUnitAssemblyAttributes.cs" />
</ItemGroup>
Expand Down

This file was deleted.

Loading
Loading