Skip to content

Commit 56515bb

Browse files
committed
Removed flattened assertion from xpack usage tests (#5696)
* Removed flattened assert from xpack * Extend DebugMode test timeout to 10s (cherry picked from commit f7ee2f6)
1 parent 3d0c0e2 commit 56515bb

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +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"))
74+
{
7075
r.Features.Vectors.Should().NotBeNull();
7176

7277
if (TestConfiguration.Instance.InRange(">=7.5.0"))
@@ -102,10 +107,27 @@ [I] public async Task XPackUsageResponse() => await Assert<XPackUsageResponse>(X
102107
r.Alerting.Execution.Should().NotBeNull();
103108
r.Alerting.Watch.Should().NotBeNull();
104109

110+
// Flattened fields were moved from x-pack to core in 7.13.0 (https://github.com/elastic/elasticsearch/pull/68780)
111+
if (TestConfiguration.Instance.InRange(">=7.3.0") && TestConfiguration.Instance.InRange("<7.13.0"))
112+
r.Flattened.Should().NotBeNull();
113+
114+
if (TestConfiguration.Instance.InRange(">=7.6.0") && TestConfiguration.Instance.InRange("<7.13.0"))
115+
r.Flattened.FieldCount.Should().HaveValue();
116+
105117
if (TestConfiguration.Instance.InRange(">=7.3.0"))
106118
{
107119
r.Vectors.Should().NotBeNull();
108120
r.VotingOnly.Should().NotBeNull();
121+
122+
if (TestConfiguration.Instance.InRange("<7.5.0"))
123+
#pragma warning disable 618
124+
r.DataFrame.Should().NotBeNull();
125+
#pragma warning restore 618
126+
}
127+
128+
if (TestConfiguration.Instance.InRange(">=7.5.0"))
129+
{
130+
r.Enrich.Should().NotBeNull();
109131
}
110132

111133
if (TestConfiguration.Instance.InRange(">=7.8.0"))

0 commit comments

Comments
 (0)