Skip to content

Commit c5deaa9

Browse files
committed
Modified the benchmark tests so they use the configured ConnectionStrings type.
1 parent ad2a196 commit c5deaa9

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

test/AdoNetCore.AseClient.Tests/Benchmark/Benchmarks.cs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Data;
44
using System.Linq;
@@ -8,20 +8,13 @@ namespace AdoNetCore.AseClient.Tests.Benchmark
88
{
99
public partial class Benchmarks<T> where T : IConnectionProvider
1010
{
11-
// ReSharper disable once StaticMemberInGenericType
12-
private static readonly string AseServer = Environment.MachineName; // NOTE set this for your own benchmarking tests.
13-
private const int AsePort = 5000; // NOTE set this for your own benchmarking tests.
14-
private const string AseDatabase = "pubs2"; // NOTE set this for your own benchmarking tests.
15-
private const string AseUsername = "sa"; // NOTE set this for your own benchmarking tests.
16-
private const string AsePassword = "password"; // NOTE set this for your own benchmarking tests.
17-
1811
// This connection string is used for setting up the database. It requires DDL permissions. Adjust accordingly.
1912
private string _setupConnectionString;
2013
private IConnectionProvider _connectionProvider;
2114

22-
public string UnpooledConnectionString { get; } = $"Data Source={AseServer};Port={AsePort};Database={AseDatabase};Uid={AseUsername};Pwd={AsePassword}";
15+
public string UnpooledConnectionString { get; } =ConnectionStrings.NonPooled;
2316

24-
public string PooledConnectionString => $"{UnpooledConnectionString};Pooling=true;Min Pool Size=5;Max Pool Size=10";
17+
public string PooledConnectionString => ConnectionStrings.Pooled10;
2518

2619

2720
private void Initialise(IConnectionProvider connectionProvider)
@@ -273,4 +266,4 @@ public sealed class DataItem
273266
/// </summary>
274267
public int Value { get; set; }
275268
}
276-
}
269+
}

0 commit comments

Comments
 (0)