diff --git a/tests/IntegrationTests/ConnectionPool.cs b/tests/IntegrationTests/ConnectionPool.cs index c7aeb4a72..026a8abdb 100644 --- a/tests/IntegrationTests/ConnectionPool.cs +++ b/tests/IntegrationTests/ConnectionPool.cs @@ -46,6 +46,7 @@ public void ResetConnection(object connectionReset, int poolSize, object expecte [Fact] public async Task ExhaustConnectionPool() { +#pragma warning disable xUnit1030 // Do not call ConfigureAwait(false) in test method var csb = AppConfig.CreateConnectionStringBuilder(); csb.Pooling = true; csb.MinimumPoolSize = 0; @@ -57,7 +58,7 @@ public async Task ExhaustConnectionPool() for (int i = 0; i < csb.MaximumPoolSize; i++) { var connection = new MySqlConnection(csb.ConnectionString); - await connection.OpenAsync().ConfigureAwait(true); + await connection.OpenAsync().ConfigureAwait(false); connections.Add(connection); } @@ -71,7 +72,7 @@ public async Task ExhaustConnectionPool() using (var extraConnection = new MySqlConnection(csb.ConnectionString)) { var stopwatch = Stopwatch.StartNew(); - await extraConnection.OpenAsync().ConfigureAwait(true); + await extraConnection.OpenAsync().ConfigureAwait(false); stopwatch.Stop(); Assert.InRange(stopwatch.ElapsedMilliseconds, 4500, 7500); } @@ -80,6 +81,7 @@ public async Task ExhaustConnectionPool() foreach (var connection in connections) connection.Dispose(); +#pragma warning restore xUnit1030 // Do not call ConfigureAwait(false) in test method } [Fact]