Skip to content

Commit 286b75e

Browse files
Update 7.11 to support tests against latest-7 (#5504)
* Add data_frozen node role (#5322) (#5324) Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk> (cherry picked from commit 3972945) * Less flaky test assertions (#5462) (#5477) (cherry picked from commit 26ccb7f) * bump * Update test matric Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 35b241e commit 286b75e

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

.ci/test-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22

33
STACK_VERSION:
4-
- 7.x-SNAPSHOT
4+
- 7.11-SNAPSHOT
55

66
TEST_SUITE:
77
- free

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,3 +402,4 @@ A small HTTP server will be spun up locally on port 8000 through which you can v
402402
This software is Copyright (c) 2014-2019 by Elasticsearch BV.
403403

404404
This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/elasticsearch-net/blob/master/license.txt).
405+

src/Nest/Cluster/NodesInfo/NodeRole.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ public enum NodeRole
2020
[EnumMember(Value = "data_cold")]
2121
DataCold,
2222

23+
[EnumMember(Value = "data_frozen")]
24+
DataFrozen,
25+
2326
[EnumMember(Value = "data_content")]
2427
DataContent,
2528

tests/Tests/Search/Search/SearchApiTests.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -722,11 +722,22 @@ public SearchApiRuntimeFieldsTests(ReadOnlyCluster cluster, EndpointUsage usage)
722722
protected override void ExpectResponse(ISearchResponse<Project> response)
723723
{
724724
response.Hits.Count.Should().BeGreaterThan(0);
725-
response.Hits.First().Should().NotBeNull();
726-
response.Hits.First().Type.Should().NotBeNullOrWhiteSpace();
727-
response.Hits.First().Fields.ValueOf<ProjectRuntimeFields, string>(p => p.StartedOnDayOfWeek).Should().NotBeNullOrEmpty();
728-
response.Hits.First().Fields.ValueOf<ProjectRuntimeFields, string>(p => p.ThirtyDaysFromStarted).Should().NotBeNullOrEmpty();
729-
response.Hits.First().Fields[RuntimeFieldName].As<string[]>().FirstOrDefault().Should().NotBeNullOrEmpty();
725+
726+
foreach (var hit in response.Hits)
727+
{
728+
hit.Should().NotBeNull();
729+
730+
if (hit.Source.StartedOn != default)
731+
{
732+
hit.Fields.ValueOf<ProjectRuntimeFields, string>(p => p.StartedOnDayOfWeek).Should().NotBeNullOrEmpty();
733+
hit.Fields.ValueOf<ProjectRuntimeFields, string>(p => p.ThirtyDaysFromStarted).Should().NotBeNullOrEmpty();
734+
}
735+
736+
if (!string.IsNullOrEmpty(hit.Source.Type))
737+
{
738+
hit.Fields[RuntimeFieldName].As<string[]>().FirstOrDefault().Should().NotBeNullOrEmpty();
739+
}
740+
}
730741
}
731742
}
732743
}

0 commit comments

Comments
 (0)