Skip to content

Commit d129881

Browse files
committed
User Story 38131: Stress Tests CI
- Fixed assert related to database usernames.
1 parent 245b91d commit d129881

File tree

1 file changed

+6
-2
lines changed
  • src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Framework

1 file changed

+6
-2
lines changed

src/Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Framework/DataSource.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ internal SqlServerDataSource(string name, bool isDefault, IDictionary<string, st
162162
else
163163
SupportsWindowsAuthentication = false;
164164

165-
if (string.IsNullOrEmpty(User) && !SupportsWindowsAuthentication)
166-
throw new ArgumentException("SQL Server settings should include either a valid User name or SupportsWindowsAuthentication=true");
165+
if (string.IsNullOrEmpty(EntraIdUser)
166+
&& string.IsNullOrEmpty(User)
167+
&& !SupportsWindowsAuthentication)
168+
{
169+
throw new ArgumentException("SQL Server settings should include either a valid user or SupportsWindowsAuthentication=true");
170+
}
167171
}
168172

169173
public override void Emit(byte indent)

0 commit comments

Comments
 (0)