mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 21:48:39 +00:00
`AsyncSearchActionTests` currently fails quite often. That is since the introduction of `RestSubmitAsyncSearchActionTests` which indirectly manipulates the channels being tracked in `RestCancellableNodeClient`. There are channels left in the map after `RestSubmitAsyncSearchActionTests` is run, and later `AsyncSearchActionTests` checks that there are no channels in the map which makes each test method fail. This is particularily hard to reproduce as the order in which tests are run appears to be platform dependent. The test cluster assertion that there are no channels in the map only makes sense in the context of internal cluster tests, while there may be collisions with unit tests that register http channels as part of their testing. This can be solved by renaming `AsyncSearchActionTests` to `AsyncSearchActionIT`. This way it won't be run as part of unit tests but rather within another JVM where the number of channels is `0` and such assumption holds, because there are no expected manual manipulation of the channels. Relates to #54180
54 lines
1.5 KiB
Groovy
54 lines
1.5 KiB
Groovy
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
evaluationDependsOn(xpackModule('core'))
|
|
|
|
apply plugin: 'elasticsearch.esplugin'
|
|
esplugin {
|
|
name 'x-pack-async-search'
|
|
description 'A module which allows to track the progress of a search asynchronously.'
|
|
classname 'org.elasticsearch.xpack.search.AsyncSearch'
|
|
extendedPlugins = ['x-pack-core']
|
|
}
|
|
archivesBaseName = 'x-pack-async-search'
|
|
|
|
compileJava.options.compilerArgs << "-Xlint:-rawtypes"
|
|
compileTestJava.options.compilerArgs << "-Xlint:-rawtypes"
|
|
|
|
// add all sub-projects of the qa sub-project
|
|
gradle.projectsEvaluated {
|
|
project.subprojects
|
|
.find { it.path == project.path + ":qa" }
|
|
.subprojects
|
|
.findAll { it.path.startsWith(project.path + ":qa") }
|
|
.each { check.dependsOn it.check }
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly project(":server")
|
|
|
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
testCompile project(path: xpackModule('ilm'))
|
|
}
|
|
|
|
dependencyLicenses {
|
|
ignoreSha 'x-pack-core'
|
|
}
|
|
|
|
integTest.enabled = false
|
|
|
|
// Instead we create a separate task to run the
|
|
// tests based on ESIntegTestCase
|
|
task internalClusterTest(type: Test) {
|
|
description = 'Java fantasy integration tests'
|
|
mustRunAfter test
|
|
|
|
include '**/*IT.class'
|
|
}
|
|
|
|
check.dependsOn internalClusterTest
|