Skip to content

Commit f2c9f4c

Browse files
committed
Fix build warnings
1 parent 23e8388 commit f2c9f4c

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/Nest/Document/Single/Delete/DeleteResponse.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ public class DeleteResponse : ResponseBase, IDeleteResponse
5151
[JsonProperty("found")]
5252
public bool Found { get; internal set; }
5353

54+
#pragma warning disable 809 // Obsolete member overrides non-obsolete member
5455
[Obsolete(@"WARNING: IsValid behavior has changed to align with 1.x and 5.x onwards.
5556
It now returns true for 404 responses (document not found), where previously it returned
5657
false. Please use .Found to check whether the document was actually found.")]
5758
public override bool IsValid => base.IsValid;
59+
#pragma warning restore 809
5860
}
5961
}

src/Nest/Document/Single/Get/GetResponse.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ public class GetResponse<T> : ResponseBase, IGetResponse<T> where T : class
5454
public long? Timestamp { get; private set; }
5555
public long? Ttl { get; private set; }
5656

57+
#pragma warning disable 809 // Obsolete member overrides non-obsolete member
5758
[Obsolete(@"WARNING: IsValid behavior has changed to align with 1.x and 5.x onwards.
5859
It now returns true for 404 responses (document not found), where previously it returned
5960
false. Please use .Found to check whether the document was actually found.")]
6061
public override bool IsValid => base.IsValid;
62+
#pragma warning restore 809
6163
}
6264
}

src/Tests/Framework/VirtualClustering/Audit/Auditor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ public async Task<Auditor> TraceCall(ClientCall callTrace, int nthCall = 0)
7474
return AssertAuditTrails(callTrace, nthCall);
7575
}
7676

77+
#pragma warning disable 1998 // Async method lacks 'await' operators and will run synchronously
7778
private async Task TraceException<TException>(ClientCall callTrace, Action<TException> assert)
79+
#pragma warning restore 1998 // Async method lacks 'await' operators and will run synchronously
7880
where TException : ElasticsearchClientException
7981
{
8082
this._cluster = _cluster ?? this.Cluster();

src/Tests/Tests.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,6 @@
567567
<Compile Include=".\Search\FieldStats\FieldStatsApiTests.cs" />
568568
<Compile Include=".\Search\FieldStats\FieldStatsUrlTests.cs" />
569569
<Compile Include=".\Search\MultiSearch\MultiSearchApiTests.cs" />
570-
<Compile Include=".\Search\MultiSearch\MultiSearchInvalidApiTests.cs" />
571570
<Compile Include=".\Search\MultiSearch\MultiSearchLowLevelPostDataTests.cs" />
572571
<Compile Include=".\Search\MultiSearch\MultiSearchUrlTests.cs" />
573572
<Compile Include=".\Search\Percolator\MultiPercolate\MultiPercolateApiTests.cs" />
@@ -664,7 +663,6 @@
664663
<Compile Include="Reproduce\GithubIssue2503.cs" />
665664
<Compile Include="Reproduce\GithubIssue2690.cs" />
666665
<Compile Include="Search\Hits\HitsSerializationTests.cs" />
667-
<Compile Include="Search\MultiSearch\MultiSearchApiTests.cs" />
668666
<Compile Include="Search\MultiSearch\MultiSearchInvalidApiTests.cs" />
669667
<Compile Include="Framework\Extensions\UriExtensions.cs" />
670668
<Compile Include="Framework\VirtualClustering\WaitingInMemoryConnection.cs" />

0 commit comments

Comments
 (0)