-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Migrate and consolidate x-pack-async-search REST tests #130832
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
base: main
Are you sure you want to change the base?
Migrate and consolidate x-pack-async-search REST tests #130832
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
@@ -10,8 +13,6 @@ base { | |||
archivesName = 'x-pack-async-search' | |||
} | |||
|
|||
addQaCheckDependencies(project) |
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.
This is no longer necessary because the :qa
child project has been removed. This is used to ensure that if I run ./gradlew :x-pack:plugin:async-search:check
that the check tasks for all child projects are also run.
@@ -5,7 +5,7 @@ | |||
* 2.0. | |||
*/ | |||
|
|||
package org.elasticsearch.qa; | |||
package org.elasticsearch.xpack.search; |
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.
I went ahead and moved this into the same package as the other test.
@@ -20,7 +20,7 @@ | |||
|
|||
public class AsyncSearchHeadersIT extends ESRestTestCase { | |||
@ClassRule | |||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("x-pack-async-search").build(); | |||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("x-pack-async-search").build(); |
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.
Using a "module" is actually slightly more efficient here as well. Plugins haven't to be built, then packaged into a zip archive. Modules are copied (potentially symlinked) from their original build directory so there's less file IO involved.
@@ -95,8 +94,9 @@ public class AsyncSearchSecurityIT extends ESRestTestCase { | |||
|
|||
@ClassRule | |||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local() | |||
.distribution(DistributionType.DEFAULT) |
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.
Removed usage of the default distro.
compileOnly project(path: xpackModule('core')) | ||
testImplementation(testArtifact(project(xpackModule('core')))) | ||
testImplementation project(path: xpackModule('async')) | ||
testImplementation testArtifact(project(':server')) |
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.
I just tidied these dependency declarations up a bit. I like to group them by source set, so production dependencies, then test, etc.
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.
LGTM
This migrates legacy rest tests in the async-search module, as well as consolidates tests under
qa
into the main module directory.