Skip to content

Commit 2001824

Browse files
committed
User Story 38467: Backport mac server name fix
- Adding console diagnostics to slow enclave tests.
1 parent 7b2174f commit 2001824

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/TestTrustedMasterKeyPaths.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ public class TestTrustedMasterKeyPaths : IClassFixture<SQLSetupStrategyCertStore
1313

1414
public TestTrustedMasterKeyPaths(SQLSetupStrategyCertStoreProvider fixture)
1515
{
16+
Console.WriteLine("Start: TestTrustedMasterKeyPaths()");
1617
columnMasterKeyPath = string.Format(@"{0}/{1}/{2}", StoreLocation.CurrentUser.ToString(), @"my", CertificateUtility.CreateCertificate().Thumbprint);
1718
this.fixture = fixture;
1819
tableName = fixture.TrustedMasterKeyPathsTestTable.Name;
20+
Console.WriteLine("End: TestTrustedMasterKeyPaths()");
1921
}
2022

2123
/// <summary>
@@ -24,6 +26,7 @@ public TestTrustedMasterKeyPaths(SQLSetupStrategyCertStoreProvider fixture)
2426
/// <param name="sqlDataReader"></param>
2527
private void ValidateResultSet(SqlDataReader sqlDataReader)
2628
{
29+
Console.WriteLine("Start: ValidateResultSet()");
2730
// Validate the result set
2831
int rowsFound = 0;
2932
while (sqlDataReader.Read())
@@ -42,13 +45,15 @@ private void ValidateResultSet(SqlDataReader sqlDataReader)
4245
rowsFound++;
4346
}
4447
Assert.True(rowsFound == 1, "Incorrect number of rows returned in first execution.");
48+
Console.WriteLine("End: ValidateResultSet()");
4549
}
4650

4751
[PlatformSpecific(TestPlatforms.Windows)]
4852
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringSetupForAE))]
4953
[ClassData(typeof(AEConnectionStringProvider))]
5054
public void TestTrustedColumnEncryptionMasterKeyPathsWithNullDictionary(string connection)
5155
{
56+
Console.WriteLine($"Start: TestTrustedColumnEncryptionMasterKeyPathsWithNullDictionary(); connection string: {connection}");
5257
SqlConnectionStringBuilder connBuilder = new SqlConnectionStringBuilder(connection);
5358
connBuilder.ConnectTimeout = 10000;
5459
string connStringNow = connBuilder.ToString();
@@ -81,13 +86,15 @@ FROM [{tableName}]
8186
}
8287
// Clear out trusted key paths
8388
SqlConnection.ColumnEncryptionTrustedMasterKeyPaths.Clear();
89+
Console.WriteLine("End: TestTrustedColumnEncryptionMasterKeyPathsWithNullDictionary()");
8490
}
8591

8692
[PlatformSpecific(TestPlatforms.Windows)]
8793
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringSetupForAE))]
8894
[ClassData(typeof(AEConnectionStringProvider))]
8995
public void TestTrustedColumnEncryptionMasterKeyPathsWithOneServer(string connection)
9096
{
97+
Console.WriteLine($"Start: TestTrustedColumnEncryptionMasterKeyPathsWithOneServer(); connection string: {connection}");
9198
SqlConnectionStringBuilder connBuilder = new SqlConnectionStringBuilder(connection);
9299
connBuilder.ConnectTimeout = 10000;
93100
string connStringNow = connBuilder.ToString();
@@ -127,13 +134,15 @@ FROM [{tableName}]
127134
}
128135
// Clear out trusted key paths
129136
SqlConnection.ColumnEncryptionTrustedMasterKeyPaths.Clear();
137+
Console.WriteLine("End: TestTrustedColumnEncryptionMasterKeyPathsWithOneServer()");
130138
}
131139

132140
[PlatformSpecific(TestPlatforms.Windows)]
133141
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringSetupForAE))]
134142
[ClassData(typeof(AEConnectionStringProvider))]
135143
public void TestTrustedColumnEncryptionMasterKeyPathsWithMultipleServers(string connection)
136144
{
145+
Console.WriteLine($"Start: TestTrustedColumnEncryptionMasterKeyPathsWithMultipleServers(); connection string: {connection}");
137146
SqlConnectionStringBuilder connBuilder = new SqlConnectionStringBuilder(connection);
138147
connBuilder.ConnectTimeout = 10000;
139148
string connStringNow = connBuilder.ToString();
@@ -190,13 +199,15 @@ FROM [{tableName}]
190199
}
191200
// Clear out trusted key paths
192201
SqlConnection.ColumnEncryptionTrustedMasterKeyPaths.Clear();
202+
Console.WriteLine("End: TestTrustedColumnEncryptionMasterKeyPathsWithMultipleServers()");
193203
}
194204

195205
[PlatformSpecific(TestPlatforms.Windows)]
196206
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringSetupForAE))]
197207
[ClassData(typeof(AEConnectionStringProvider))]
198208
public void TestTrustedColumnEncryptionMasterKeyPathsWithInvalidInputs(string connection)
199209
{
210+
Console.WriteLine($"Start: TestTrustedColumnEncryptionMasterKeyPathsWithInvalidInputs(); connection string: {connection}");
200211
SqlConnectionStringBuilder connBuilder = new SqlConnectionStringBuilder(connection);
201212
connBuilder.ConnectTimeout = 10000;
202213
string connStringNow = connBuilder.ToString();
@@ -303,6 +314,7 @@ FROM [{tableName}]
303314

304315
// Clear out trusted key paths
305316
SqlConnection.ColumnEncryptionTrustedMasterKeyPaths.Clear();
317+
Console.WriteLine("End: TestTrustedColumnEncryptionMasterKeyPathsWithInvalidInputs()");
306318
}
307319
}
308320
}

0 commit comments

Comments
 (0)