@@ -24,11 +24,11 @@ public static void RunAllTestsForSingleServer_NP()
24
24
{
25
25
if ( ! RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
26
26
{
27
- DataTestUtility . AssertThrowsWrapper < PlatformNotSupportedException > ( ( ) => RunAllTestsForSingleServer ( DataTestUtility . NPConnectionString , true ) ) ;
27
+ DataTestUtility . AssertThrowsWrapper < PlatformNotSupportedException > ( ( ) => RunAllTestsForSingleServer ( DataTestUtility . NPConnectionString ) ) ;
28
28
}
29
29
else
30
30
{
31
- RunAllTestsForSingleServer ( DataTestUtility . NPConnectionString , true ) ;
31
+ RunAllTestsForSingleServer ( DataTestUtility . NPConnectionString ) ;
32
32
}
33
33
}
34
34
@@ -37,7 +37,7 @@ public static void RunAllTestsForSingleServer_TCP()
37
37
{
38
38
RunAllTestsForSingleServer ( DataTestUtility . TCPConnectionString ) ;
39
39
}
40
-
40
+
41
41
// Synapse: The statement failed. Column 'foo' has a data type that cannot participate in a columnstore index.
42
42
[ ConditionalFact ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . AreConnStringsSetup ) , nameof ( DataTestUtility . IsNotAzureSynapse ) ) ]
43
43
public static async Task AsyncMultiPacketStreamRead ( )
@@ -119,7 +119,35 @@ static async Task LocalCopyTo(Stream source, Stream destination, int bufferSize,
119
119
Assert . Fail ( $ "input and output differ at index { index } , input={ inputData [ index ] } , output={ outputData [ index ] } ") ;
120
120
}
121
121
}
122
+ }
123
+
124
+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . AreConnStringsSetup ) , nameof ( DataTestUtility . IsNotAzureServer ) ) ]
125
+ [ MemberData ( nameof ( DataTestUtility . GetConnectionStringsWithEnclaveMemberData ) , MemberType = typeof ( DataTestUtility ) ) ]
126
+ public static void XEventsStreamingTest ( string connectionString )
127
+ {
128
+ TestXEventsStreaming ( connectionString ) ;
129
+ }
130
+
131
+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . AreConnStringsSetup ) , nameof ( DataTestUtility . IsUsingNativeSNI ) , nameof ( DataTestUtility . IsNotNamedInstance ) ) ]
132
+ [ MemberData ( nameof ( DataTestUtility . GetConnectionStringsWithEnclaveMemberData ) , MemberType = typeof ( DataTestUtility ) ) ]
133
+ public static void TestTimeoutDuringReadAsyncWithClosedReaderTest ( string connectionString )
134
+ {
135
+ TimeoutDuringReadAsyncWithClosedReaderTest ( connectionString ) ;
136
+ }
122
137
138
+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . AreConnStringsSetup ) , nameof ( DataTestUtility . IsNotNamedInstance ) ) ]
139
+ [ MemberData ( nameof ( DataTestUtility . GetConnectionStringsWithEnclaveMemberData ) , MemberType = typeof ( DataTestUtility ) ) ]
140
+ public static void NonFatalTimeoutDuringReadTest ( string connectionString )
141
+ {
142
+ NonFatalTimeoutDuringRead ( connectionString ) ;
143
+ }
144
+
145
+ [ ActiveIssue ( "https://github.com/dotnet/SqlClient/issues/3035" , typeof ( DataStreamTest ) , nameof ( IsArm ) ) ]
146
+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . AreConnStringsSetup ) ) ]
147
+ [ MemberData ( nameof ( DataTestUtility . GetConnectionStringsWithEnclaveMemberData ) , MemberType = typeof ( DataTestUtility ) ) ]
148
+ public static void XmlReaderTest ( string connectionString )
149
+ {
150
+ ExecuteXmlReaderTest ( connectionString ) ;
123
151
}
124
152
125
153
private static byte [ ] CreateBinaryTable ( SqlConnection connection , string tableName , int packetSize )
@@ -152,7 +180,7 @@ IF OBJECT_ID('dbo.{tableName}', 'U') IS NOT NULL
152
180
return data ;
153
181
}
154
182
155
- private static void RunAllTestsForSingleServer ( string connectionString , bool usingNamePipes = false )
183
+ private static void RunAllTestsForSingleServer ( string connectionString )
156
184
{
157
185
RowBuffer ( connectionString ) ;
158
186
InvalidRead ( connectionString ) ;
@@ -165,7 +193,6 @@ private static void RunAllTestsForSingleServer(string connectionString, bool usi
165
193
TimestampRead ( connectionString ) ;
166
194
OrphanReader ( connectionString ) ;
167
195
BufferSize ( connectionString ) ;
168
- ExecuteXmlReaderTest ( connectionString ) ;
169
196
SequentialAccess ( connectionString ) ;
170
197
HasRowsTest ( connectionString ) ;
171
198
CloseConnection ( connectionString ) ;
@@ -178,25 +205,6 @@ private static void RunAllTestsForSingleServer(string connectionString, bool usi
178
205
ReadTextReader ( connectionString ) ;
179
206
StreamingBlobDataTypes ( connectionString ) ;
180
207
OutOfOrderGetChars ( connectionString ) ;
181
-
182
- // Azure Database does not support Server scoped XEvents and the timeout tests use the ProxyServer which also does not work on Azure and on named instances
183
- if ( IsAzureSqlServer ( connectionString ) || IsNamedInstance ( connectionString ) )
184
- {
185
- return ;
186
- }
187
-
188
- TestXEventsStreaming ( connectionString ) ;
189
-
190
- // These tests fail with named pipes, since they try to do DNS lookups on named pipe paths.
191
- if ( ! usingNamePipes )
192
- {
193
- if ( DataTestUtility . IsUsingNativeSNI ( ) )
194
- {
195
- TimeoutDuringReadAsyncWithClosedReaderTest ( connectionString ) ;
196
- }
197
-
198
- NonFatalTimeoutDuringRead ( connectionString ) ;
199
- }
200
208
}
201
209
202
210
private static void MultipleResults ( string connectionString )
@@ -265,15 +273,11 @@ private static void MultipleResults(string connectionString)
265
273
}
266
274
}
267
275
268
- private static bool IsAzureSqlServer ( string connectionString )
269
- {
270
- return Utils . IsAzureSqlServer ( new SqlConnectionStringBuilder ( connectionString ) . DataSource ) ;
271
- }
276
+ private static bool IsAzureSqlServer ( string connectionString ) => Utils . IsAzureSqlServer ( new SqlConnectionStringBuilder ( connectionString ) . DataSource ) ;
272
277
273
- private static bool IsNamedInstance ( string connectionString )
274
- {
275
- return new SqlConnectionStringBuilder ( connectionString ) . DataSource . Contains ( @"\" ) ;
276
- }
278
+ private static bool IsNamedInstance ( string connectionString ) => new SqlConnectionStringBuilder ( connectionString ) . DataSource . Contains ( @"\" ) ;
279
+
280
+ private static bool IsArm => RuntimeInformation . ProcessArchitecture == Architecture . Arm || RuntimeInformation . ProcessArchitecture == Architecture . Arm64 ;
277
281
278
282
private static void InvalidRead ( string connectionString )
279
283
{
0 commit comments