Skip to content

Ignore obsolete warning in tests #8290

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

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ resharper_redundant_argument_default_value_highlighting=do_not_show
spelling_languages=en-us,en-gb
spelling_exclusion_path=exclusion.dic

[{tests/**.cs}]
# CS0618: Type or member is obsolete, tests are testing methods we have marked as obsolete that are still bundled in the client
dotnet_diagnostic.CS0618.severity = none

[Jenkinsfile]
indent_style = space
indent_size = 2
Expand Down
2 changes: 0 additions & 2 deletions tests/Tests/Aggregations/AggregationMetaUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

namespace Tests.Aggregations;

#pragma warning disable CS0618 // Type or member is obsolete
public class AggregationMetaUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public AggregationMetaUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down Expand Up @@ -48,7 +46,7 @@
)
);

protected override AggregationDictionary InitializerAggs =>

Check failure on line 49 in tests/Tests/Aggregations/AggregationMetaUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.9.0-SNAPSHOT)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 49 in tests/Tests/Aggregations/AggregationMetaUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.7.1)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 49 in tests/Tests/Aggregations/AggregationMetaUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.3.3)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 49 in tests/Tests/Aggregations/AggregationMetaUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.6.2)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 49 in tests/Tests/Aggregations/AggregationMetaUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.0.1)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 49 in tests/Tests/Aggregations/AggregationMetaUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (latest-8)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 49 in tests/Tests/Aggregations/AggregationMetaUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.1.3)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)
new MinAggregation("min_last_activity")
{
Field = Infer.Field<Project>(p => p.LastActivity),
Expand Down
2 changes: 0 additions & 2 deletions tests/Tests/Aggregations/Bucket/TermsAggregationUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

namespace Tests.Aggregations.Bucket;

#pragma warning disable CS0618 // Type or member is obsolete
public class TermsAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public TermsAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class AverageAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public AverageAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down Expand Up @@ -50,7 +48,7 @@
.Script(new Script(new InlineScript("_value * 1.2")))
);

protected override AggregationDictionary InitializerAggs =>

Check failure on line 51 in tests/Tests/Aggregations/Metric/AverageAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.9.0-SNAPSHOT)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in tests/Tests/Aggregations/Metric/AverageAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.3.3)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in tests/Tests/Aggregations/Metric/AverageAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.6.2)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in tests/Tests/Aggregations/Metric/AverageAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.0.1)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in tests/Tests/Aggregations/Metric/AverageAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.5.3)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)
new AverageAggregation("average_commits", Field<Project>(p => p.NumberOfCommits))
{
Meta = new Dictionary<string, object>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class BoxplotAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public BoxplotAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down Expand Up @@ -46,7 +44,7 @@
.Compression(100)
);

protected override AggregationDictionary InitializerAggs =>

Check failure on line 47 in tests/Tests/Aggregations/Metric/BoxplotAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.9.0-SNAPSHOT)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 47 in tests/Tests/Aggregations/Metric/BoxplotAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.3.3)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 47 in tests/Tests/Aggregations/Metric/BoxplotAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.6.2)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 47 in tests/Tests/Aggregations/Metric/BoxplotAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.0.1)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 47 in tests/Tests/Aggregations/Metric/BoxplotAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.5.3)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)
new BoxplotAggregation("boxplot_commits", Field<Project>(p => p.NumberOfCommits))
{
Meta = new Dictionary<string, object>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class CardinalityAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public CardinalityAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand All @@ -36,7 +34,7 @@
.PrecisionThreshold(100)
);

protected override AggregationDictionary InitializerAggs =>

Check failure on line 37 in tests/Tests/Aggregations/Metric/CardinalityAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.9.0-SNAPSHOT)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 37 in tests/Tests/Aggregations/Metric/CardinalityAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.3.3)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 37 in tests/Tests/Aggregations/Metric/CardinalityAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.5.3)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)
new CardinalityAggregation("state_count", Field<Project>(p => p.State))
{
PrecisionThreshold = 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class ExtendedStatsAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public ExtendedStatsAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand All @@ -37,7 +35,7 @@
.Sigma(1)
);

protected override AggregationDictionary InitializerAggs =>

Check failure on line 38 in tests/Tests/Aggregations/Metric/ExtendedStatsAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.9.0-SNAPSHOT)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 38 in tests/Tests/Aggregations/Metric/ExtendedStatsAggregationUsageTests.cs

View workflow job for this annotation

GitHub Actions / Tests (8.5.3)

The type or namespace name 'AggregationDictionary' could not be found (are you missing a using directive or an assembly reference?)
new ExtendedStatsAggregation("commit_stats", Field<Project>(p => p.NumberOfCommits))
{
Sigma = 1
Expand Down
2 changes: 0 additions & 2 deletions tests/Tests/Aggregations/Metric/MaxAggregationUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class MaxAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public MaxAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class MedianAbsoluteDeviationAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public MedianAbsoluteDeviationAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
2 changes: 0 additions & 2 deletions tests/Tests/Aggregations/Metric/MinAggregationUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class MinAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public MinAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
2 changes: 0 additions & 2 deletions tests/Tests/Aggregations/Metric/StatsAggregationUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class StatsAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public StatsAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class StringStatsAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public StringStatsAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class StringStatsWithDistributionAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public StringStatsWithDistributionAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
2 changes: 0 additions & 2 deletions tests/Tests/Aggregations/Metric/SumAggregationUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class SumAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public SumAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class ValueCountAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public ValueCountAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

namespace Tests.Aggregations.Metric;

#pragma warning disable CS0618 // Type or member is obsolete
public class WeightedAverageAggregationUsageTests : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
public WeightedAverageAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) : base(i, usage) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

namespace Tests.Aggregations;

#pragma warning disable CS0618 // Type or member is obsolete
public abstract class ProjectsOnlyAggregationUsageTestBase : AggregationUsageTestBase<ReadOnlyCluster>
#pragma warning restore CS0618 // Type or member is obsolete
{
protected ProjectsOnlyAggregationUsageTestBase(ReadOnlyCluster cluster, EndpointUsage usage) : base(cluster, usage) { }

Expand Down
Loading