Skip to content

Commit

Permalink
Disable all the metrics tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrainger committed Oct 29, 2023
1 parent 059410a commit 578b0d0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
6 changes: 4 additions & 2 deletions tests/MySqlConnector.Tests/Metrics/ConnectionTimeTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#if METRICS_TESTS
namespace MySqlConnector.Tests.Metrics;

public class ConnectionTimeTests : MetricsTestsBase
{
[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public async Task ConnectionTime()
{
var csb = CreateConnectionStringBuilder();
Expand Down Expand Up @@ -44,7 +45,7 @@ public async Task OpenFromPoolTime()
Assert.InRange(time, 0, 200);
}

[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public async Task OpenFromPoolTimeWithDelay()
{
var csb = CreateConnectionStringBuilder();
Expand Down Expand Up @@ -90,3 +91,4 @@ public async Task UseTimeWithDelay()
Assert.InRange(time, 500, 600);
}
}
#endif
10 changes: 6 additions & 4 deletions tests/MySqlConnector.Tests/Metrics/ConnectionsUsageTests.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#if METRICS_TESTS
#nullable enable

namespace MySqlConnector.Tests.Metrics;

public class ConnectionsUsageTests : MetricsTestsBase
{
[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void NamedDataSource()
{
PoolName = "metrics-test";
Expand Down Expand Up @@ -58,7 +59,7 @@ public void NamedDataSource()
Assert.Equal(2, Server.ActiveConnections);
}

[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void NamedDataSourceWithMinPoolSize()
{
var csb = CreateConnectionStringBuilder();
Expand Down Expand Up @@ -91,7 +92,7 @@ public void NamedDataSourceWithMinPoolSize()
Assert.Equal(3, Server.ActiveConnections);
}

[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void UnnamedDataSource()
{
var csb = CreateConnectionStringBuilder();
Expand Down Expand Up @@ -148,7 +149,7 @@ public void UnnamedDataSource()
Assert.Equal(2, Server.ActiveConnections);
}

[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void NoDataSource()
{
var csb = CreateConnectionStringBuilder();
Expand Down Expand Up @@ -243,3 +244,4 @@ public async Task PendingRequestForOpenFromPool()
AssertMeasurement("db.client.connections.pending_requests", 0);
}
}
#endif
14 changes: 8 additions & 6 deletions tests/MySqlConnector.Tests/Metrics/MinMaxConnectionsTests.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#if METRICS_TESTS
#nullable enable

namespace MySqlConnector.Tests.Metrics;

public class MinMaxConnectionsTests : MetricsTestsBase
{
[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void SetsMinimumIdleToDefault()
{
var csb = CreateConnectionStringBuilder();
Expand All @@ -18,7 +19,7 @@ public void SetsMinimumIdleToDefault()
AssertMeasurement("db.client.connections.idle.min", 0);
}

[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void SetsMaximumIdleToDefault()
{
var csb = CreateConnectionStringBuilder();
Expand All @@ -32,7 +33,7 @@ public void SetsMaximumIdleToDefault()
AssertMeasurement("db.client.connections.idle.max", 100);
}

[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void SetsMaximumToDefault()
{
var csb = CreateConnectionStringBuilder();
Expand All @@ -46,7 +47,7 @@ public void SetsMaximumToDefault()
AssertMeasurement("db.client.connections.max", 100);
}

[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void SetsMinimumIdleToCustom()
{
var csb = CreateConnectionStringBuilder();
Expand All @@ -65,7 +66,7 @@ public void SetsMinimumIdleToCustom()
AssertMeasurement("db.client.connections.idle.min", 0);
}

[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void SetsMaximumIdleToCustom()
{
var csb = CreateConnectionStringBuilder();
Expand All @@ -84,7 +85,7 @@ public void SetsMaximumIdleToCustom()
AssertMeasurement("db.client.connections.idle.max", 0);
}

[Fact(Skip = "Fails on Azure Pipelines")]
[Fact]
public void SetsMaximumToCustom()
{
var csb = CreateConnectionStringBuilder();
Expand All @@ -103,3 +104,4 @@ public void SetsMaximumToCustom()
AssertMeasurement("db.client.connections.max", 0);
}
}
#endif

0 comments on commit 578b0d0

Please sign in to comment.