Skip to content

Commit 037592f

Browse files
committed
improved test cases
1 parent cbeba68 commit 037592f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/Test/MainTest.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ namespace Test
1414
[Trait("Category", "Replication")]
1515
public class MainTest
1616
{
17+
private const string _host = "localhost";
18+
private const string _username = "root";
19+
private const string _password = "root";
20+
1721
protected readonly ITestOutputHelper _outputHelper;
1822

1923
private readonly ILogger _logger;
@@ -27,12 +31,12 @@ public MainTest(ITestOutputHelper outputHelper)
2731

2832
private async Task<LoginResult> ConnectAsync(ReplicationClient client)
2933
{
30-
return await client.ConnectAsync("localhost", "root", "root", 1);
34+
return await client.ConnectAsync(_host, _username,_password, 1);
3135
}
3236

3337
private MySqlConnection CreateConnection()
3438
{
35-
return new MySqlConnection("Server=localhost;Database=garden;Uid=root;Pwd=root;");
39+
return new MySqlConnection($"Server={_host};Database=garden;Uid={_username};Pwd={_password};");
3640
}
3741

3842
[Fact]

0 commit comments

Comments
 (0)