-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add multi-cluster IT for the TS command #137237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multi-cluster IT for the TS command #137237
Conversation
Add MultiClusterTimeSeriesIT to make sure that the TS command works correctly in the multi-cluster environment. Closes elastic#135218
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
Add MultiClusterTimeSeriesIT to make sure that the TS command works correctly in the multi-cluster environment. Closes elastic#135218
Add MultiClusterTimeSeriesIT to make sure that the TS command works correctly in the multi-cluster environment. Closes elastic#135218
dnhatn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question, but this looks great. Thanks Dima!
| } | ||
|
|
||
| protected boolean supportsAsync() { | ||
| return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we always need to disable async?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I took it from the existing code, particularly from MultiClustersIT.java#L207. Reading the comment, I thought we could use async here and changed it to use the randomBoolean() method. When it's true it fails with the following exception:
MultiClusterTimeSeriesIT > testAvgOverTime FAILED
org.elasticsearch.xcontent.XContentGenerationException: com.fasterxml.jackson.core.JsonGenerationException: Can not write a field name, expecting a value
at __randomizedtesting.SeedInfo.seed([2602953138915D1E:D6848838FA018932]:0)
at org.elasticsearch.xcontent.provider.json.JsonXContentGenerator.writeFieldName(JsonXContentGenerator.java:190)
at app//org.elasticsearch.xcontent.XContentBuilder.field(XContentBuilder.java:373)
at app//org.elasticsearch.xcontent.XContentBuilder.field(XContentBuilder.java:890)
at app//org.elasticsearch.xpack.esql.qa.rest.RestEsqlTestCase$RequestObjectBuilder.waitForCompletion(RestEsqlTestCase.java:180)
at app//org.elasticsearch.xpack.esql.qa.rest.RestEsqlTestCase.addAsyncParameters(RestEsqlTestCase.java:1827)
at app//org.elasticsearch.xpack.esql.qa.rest.RestEsqlTestCase.runEsqlAsync(RestEsqlTestCase.java:1540)
at app//org.elasticsearch.xpack.esql.qa.rest.RestEsqlTestCase.runEsqlAsync(RestEsqlTestCase.java:1529)
at app//org.elasticsearch.xpack.esql.ccq.MultiClusterTimeSeriesIT.runEsql(MultiClusterTimeSeriesIT.java:295)
at app//org.elasticsearch.xpack.esql.ccq.MultiClusterTimeSeriesIT.run(MultiClusterTimeSeriesIT.java:284)
at app//org.elasticsearch.xpack.esql.ccq.MultiClusterTimeSeriesIT.testAvgOverTime(MultiClusterTimeSeriesIT.java:192)
Caused by:
com.fasterxml.jackson.core.JsonGenerationException: Can not write a field name, expecting a value
at com.fasterxml.jackson.core.JsonGenerator._constructWriteException(JsonGenerator.java:2884)
at com.fasterxml.jackson.core.JsonGenerator._reportError(JsonGenerator.java:2868)
at com.fasterxml.jackson.dataformat.cbor.CBORGenerator.writeFieldName(CBORGenerator.java:528)
at org.elasticsearch.xcontent.provider.json.JsonXContentGenerator.writeFieldName(JsonXContentGenerator.java:188)
... 9 more
Will double-check this.
Test async ESQL calls. Closes elastic#135218
Test async ESQL calls. Closes elastic#135218
* [TEST] Add MultiClusterTimeSeriesIT Add MultiClusterTimeSeriesIT to make sure that the TS command works correctly in the multi-cluster environment. Closes elastic#135218
A few explicit tests for TS queries covering counter rate and agg_over_time, in a multi-cluster setup.
The strategy of testing is the following: