Skip to content

Commit f7ee2f6

Browse files
authored
Removed flattened assertion from xpack usage tests (#5696)
* Removed flattened assert from xpack * Update test matrix * Extend DebugMode test timeout to 10s
1 parent 1e60c11 commit f7ee2f6

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
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.13.0-SNAPSHOT
55

66
TEST_SUITE:
77
- free

tests/Tests/ClientConcepts/Troubleshooting/DebugMode.doc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ [I] public void EnableDebugMode()
6060
// hide
6161
settings.DefaultIndex(Client.ConnectionSettings.DefaultIndex);
6262
// hide
63-
settings.PingTimeout(TimeSpan.FromSeconds(5)); // Avoids occasional CI failures
63+
settings.PingTimeout(TimeSpan.FromSeconds(10)); // Avoids occasional CI failures
6464

6565
var client = new ElasticClient(settings);
6666

tests/Tests/XPack/Info/XPackInfoApiTests.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ [I] public async Task XPackInfoResponse() => await Assert<XPackInfoResponse>(XPa
6666
r.Features.Watcher.Should().NotBeNull();
6767
r.License.Should().NotBeNull();
6868

69+
// Flattened fields were moved from x-pack to core in 7.13.0 (https://github.com/elastic/elasticsearch/pull/68780)
70+
if (TestConfiguration.Instance.InRange(">=7.3.0") && TestConfiguration.Instance.InRange("<7.13.0"))
71+
r.Features.Flattened.Should().NotBeNull();
72+
6973
if (TestConfiguration.Instance.InRange(">=7.3.0"))
7074
{
71-
r.Features.Flattened.Should().NotBeNull();
7275
r.Features.Vectors.Should().NotBeNull();
7376

7477
if (TestConfiguration.Instance.InRange("<7.5.0"))
@@ -110,19 +113,22 @@ [I] public async Task XPackUsageResponse() => await Assert<XPackUsageResponse>(X
110113
r.Alerting.Execution.Should().NotBeNull();
111114
r.Alerting.Watch.Should().NotBeNull();
112115

116+
// Flattened fields were moved from x-pack to core in 7.13.0 (https://github.com/elastic/elasticsearch/pull/68780)
117+
if (TestConfiguration.Instance.InRange(">=7.3.0") && TestConfiguration.Instance.InRange("<7.13.0"))
118+
r.Flattened.Should().NotBeNull();
119+
120+
if (TestConfiguration.Instance.InRange(">=7.6.0") && TestConfiguration.Instance.InRange("<7.13.0"))
121+
r.Flattened.FieldCount.Should().HaveValue();
122+
113123
if (TestConfiguration.Instance.InRange(">=7.3.0"))
114124
{
115-
r.Flattened.Should().NotBeNull();
116125
r.Vectors.Should().NotBeNull();
117126
r.VotingOnly.Should().NotBeNull();
118127

119128
if (TestConfiguration.Instance.InRange("<7.5.0"))
120129
#pragma warning disable 618
121130
r.DataFrame.Should().NotBeNull();
122131
#pragma warning restore 618
123-
124-
if (TestConfiguration.Instance.InRange(">=7.6.0"))
125-
r.Flattened.FieldCount.Should().HaveValue();
126132
}
127133

128134
if (TestConfiguration.Instance.InRange(">=7.5.0"))

0 commit comments

Comments
 (0)