Skip to content

Commit

Permalink
Disable KqlQueryBuilderTests on non-snapshots build. (elastic#117025)
Browse files Browse the repository at this point in the history
(cherry picked from commit 537bba6)

# Conflicts:
#	muted-tests.yml
#	x-pack/plugin/kql/build.gradle
  • Loading branch information
afoucret committed Nov 20, 2024
1 parent 1bc60ac commit eeeaa2c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 0 additions & 2 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ tests:
- class: org.elasticsearch.xpack.esql.qa.mixed.EsqlClientYamlIT
method: test {p0=esql/60_enrich/Enrich on keyword with fields}
issue: https://github.com/elastic/elasticsearch/issues/116593
- class: org.elasticsearch.xpack.kql.query.KqlQueryBuilderTests
issue: https://github.com/elastic/elasticsearch/issues/116487
- class: org.elasticsearch.xpack.spatial.search.GeoGridAggAndQueryConsistencyIT
method: testGeoShapeGeoTile
issue: https://github.com/elastic/elasticsearch/issues/115717
Expand Down
8 changes: 0 additions & 8 deletions x-pack/plugin/kql/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.elasticsearch.gradle.internal.info.BuildParams

import static org.elasticsearch.gradle.util.PlatformUtils.normalize

apply plugin: 'elasticsearch.internal-es-plugin'
Expand Down Expand Up @@ -28,12 +26,6 @@ dependencies {

tasks.named('yamlRestTest') {
usesDefaultDistribution()
}.configure {
/****************************************************************
* Enable QA/rest integration tests for snapshot builds only *
* TODO: Enable for all builds upon this feature release *
****************************************************************/
enabled = BuildParams.isSnapshotBuild()
}

/**********************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package org.elasticsearch.xpack.kql.query;

import org.apache.lucene.search.Query;
import org.elasticsearch.Build;
import org.elasticsearch.core.Strings;
import org.elasticsearch.index.query.MultiMatchQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
Expand All @@ -21,6 +22,7 @@
import org.elasticsearch.test.AbstractQueryTestCase;
import org.elasticsearch.xpack.kql.KqlPlugin;
import org.hamcrest.Matchers;
import org.junit.BeforeClass;

import java.io.IOException;
import java.util.Collection;
Expand All @@ -34,6 +36,10 @@
import static org.hamcrest.Matchers.nullValue;

public class KqlQueryBuilderTests extends AbstractQueryTestCase<KqlQueryBuilder> {
@BeforeClass
protected static void ensureSnapshotBuild() {
assumeTrue("requires snapshot builds", Build.current().isSnapshot());
}

@Override
protected Collection<Class<? extends Plugin>> getPlugins() {
Expand Down

0 comments on commit eeeaa2c

Please sign in to comment.