Skip to content

Commit 129e899

Browse files
committed
Fix failing mtermvector integration test
1 parent 7458c5e commit 129e899

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/Nest/Document/Multiple/MultiTermVectors/MultiTermVectorsResponse.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ public interface IMultiTermVectorsResponse : IResponse
1111
[JsonObject]
1212
public class MultiTermVectorsResponse : ResponseBase, IMultiTermVectorsResponse
1313
{
14+
// TODO For 3.0 we should create a separate term vector object rather than using TermVectorsResponse
15+
// since it contains general response data that isn't relevant (i.e. ApiCall, StatusCode, etc...)
1416
[JsonProperty("docs")]
1517
public IEnumerable<TermVectorsResponse> Documents { get; internal set; } = new List<TermVectorsResponse>();
1618
}

src/Tests/Document/Multiple/MultiTermVectors/MultiTermVectorsApiTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ protected override LazyResponses ClientUsage() => Calls(
4848

4949
protected override void ExpectResponse(IMultiTermVectorsResponse response)
5050
{
51-
response.Documents.Should().NotBeEmpty().And.HaveCount(2).And.OnlyContain(d => d.Found).And.OnlyContain(d => d.IsValid);
51+
response.IsValid.Should().BeTrue();
52+
response.Documents.Should().NotBeEmpty().And.HaveCount(2).And.OnlyContain(d => d.Found);
5253
var termvectorDoc = response.Documents.FirstOrDefault(d => d.TermVectors.Count > 0);
5354

5455
termvectorDoc.Should().NotBeNull();

src/Tests/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# mode either u (unit test), i (integration test) or m (mixed mode)
2-
mode: m
2+
mode: i
33
# the elasticsearch version that should be started
44
elasticsearch_version: 2.0.1
55
# whether we want to forcefully reseed on the node, if you are starting the tests with a node already running

0 commit comments

Comments
 (0)