Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mariadb tests #8198

Merged
merged 4 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
provider: ["MySql"]
services:
mariadb:
image: mariadb
image: mariadb:10.6
ports:
- 3306:3306
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -20,14 +20,7 @@ public class Fixture
{
public Fixture()
{
try
{
Storage = RelationalStorageForTesting.SetupInstance(AdoNetInvariantName, TestDatabaseName).GetAwaiter().GetResult();
}
catch (Exception ex)
{
Console.WriteLine($"Failed to initialize {AdoNetInvariantName} for testing: {ex}");
}
Storage = RelationalStorageForTesting.SetupInstance(AdoNetInvariantName, TestDatabaseName).GetAwaiter().GetResult();
}

public RelationalStorageForTesting Storage { get; private set; }
Expand Down
13 changes: 3 additions & 10 deletions test/TesterInternal/ConnectionStringFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,10 @@ public string ConnectionString
$"{nameof(InitializeConnectionStringAccessor)} was not called before accessing the connection string");
}

try
var connString = this.connectionStringLazy.Value.Result;
if (connString != null)
{
var connString = this.connectionStringLazy.Value.Result;
if (connString != null)
{
return connString;
}
}
catch (Exception ex)
{
throw new SkipException("Environment is not correctly set up to run these tests. " + ex);
return connString;
}

throw new SkipException("Environment is not correctly set up to run these tests. Connection string is empty.");
Expand Down