@@ -24,19 +24,18 @@ 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
35
- //[ActiveIssue("5540")]
36
- [ ConditionalFact ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . AreConnStringsSetup ) , nameof ( DataTestUtility . IsNotNamedInstance ) ) ]
35
+ [ ConditionalFact ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . AreConnStringsSetup ) ) ]
37
36
public static void RunAllTestsForSingleServer_TCP ( )
38
37
{
39
- RunAllTestsForSingleServer ( DataTestUtility . TCPConnectionString , false ) ;
38
+ RunAllTestsForSingleServer ( DataTestUtility . TCPConnectionString ) ;
40
39
}
41
40
42
41
// Synapse: The statement failed. Column 'foo' has a data type that cannot participate in a columnstore index.
@@ -120,7 +119,35 @@ static async Task LocalCopyTo(Stream source, Stream destination, int bufferSize,
120
119
Assert . Fail ( $ "input and output differ at index { index } , input={ inputData [ index ] } , output={ outputData [ index ] } ") ;
121
120
}
122
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 ) , nameof ( DataTestUtility . IsNotAzureServer ) ) ]
132
+ [ MemberData ( nameof ( DataTestUtility . GetConnectionStringsWithEnclaveMemberData ) , MemberType = typeof ( DataTestUtility ) ) ]
133
+ public static void TestTimeoutDuringReadAsyncWithClosedReaderTest ( string connectionString )
134
+ {
135
+ TimeoutDuringReadAsyncWithClosedReaderTest ( connectionString ) ;
136
+ }
137
+
138
+ [ ConditionalTheory ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . AreConnStringsSetup ) , nameof ( DataTestUtility . IsNotNamedInstance ) , nameof ( DataTestUtility . IsNotAzureServer ) ) ]
139
+ [ MemberData ( nameof ( DataTestUtility . GetConnectionStringsWithEnclaveMemberData ) , MemberType = typeof ( DataTestUtility ) ) ]
140
+ public static void NonFatalTimeoutDuringReadTest ( string connectionString )
141
+ {
142
+ NonFatalTimeoutDuringRead ( connectionString ) ;
143
+ }
123
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 ) ;
124
151
}
125
152
126
153
private static byte [ ] CreateBinaryTable ( SqlConnection connection , string tableName , int packetSize )
@@ -166,7 +193,6 @@ private static void RunAllTestsForSingleServer(string connectionString, bool usi
166
193
TimestampRead ( connectionString ) ;
167
194
OrphanReader ( connectionString ) ;
168
195
BufferSize ( connectionString ) ;
169
- ExecuteXmlReaderTest ( connectionString ) ;
170
196
SequentialAccess ( connectionString ) ;
171
197
HasRowsTest ( connectionString ) ;
172
198
CloseConnection ( connectionString ) ;
@@ -179,29 +205,13 @@ private static void RunAllTestsForSingleServer(string connectionString, bool usi
179
205
ReadTextReader ( connectionString ) ;
180
206
StreamingBlobDataTypes ( connectionString ) ;
181
207
OutOfOrderGetChars ( connectionString ) ;
208
+ }
182
209
183
- // Azure Database does not support Server scoped XEvents
184
- if ( ! IsAzureSqlServer ( connectionString ) )
185
- {
186
- TestXEventsStreaming ( connectionString ) ;
187
- }
188
-
189
- // These tests fail with named pipes, since they try to do DNS lookups on named pipe paths.
190
- if ( ! usingNamePipes )
191
- {
192
- if ( ! IsAzureSqlServer ( connectionString ) && DataTestUtility . IsUsingNativeSNI ( ) )
193
- {
194
- TimeoutDuringReadAsyncWithClosedReaderTest ( connectionString ) ;
195
- }
210
+ private static bool IsAzureSqlServer ( string connectionString ) => Utils . IsAzureSqlServer ( new SqlConnectionStringBuilder ( connectionString ) . DataSource ) ;
196
211
197
- NonFatalTimeoutDuringRead ( connectionString ) ;
198
- }
199
- }
212
+ private static bool IsNamedInstance ( string connectionString ) => new SqlConnectionStringBuilder ( connectionString ) . DataSource . Contains ( @"\" ) ;
200
213
201
- private static bool IsAzureSqlServer ( string connectionString )
202
- {
203
- return Utils . IsAzureSqlServer ( new SqlConnectionStringBuilder ( connectionString ) . DataSource ) ;
204
- }
214
+ private static bool IsArm => RuntimeInformation . ProcessArchitecture == Architecture . Arm || RuntimeInformation . ProcessArchitecture == Architecture . Arm64 ;
205
215
206
216
private static void MultipleResults ( string connectionString )
207
217
{
0 commit comments