Skip to content

Commit

Permalink
Add test tasks for unpooled and direct buffer pooling to netty (elast…
Browse files Browse the repository at this point in the history
…ic#46049)

Some netty behavior is controlled by system properties. While we want to
test with the defaults for Elasticsearch for most tests, within netty we
want to ensure these netty settings exhibit correct behavior. This
commit adds variants of test and integTest tasks for netty which set the
unpooled and direct buffer pooled allocators.

relates elastic#45881
  • Loading branch information
rjernst authored and jkakavas committed Sep 2, 2019
1 parent 815202a commit 35f8eb7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions modules/transport-netty4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
* under the License.
*/

import org.elasticsearch.gradle.test.RestIntegTestTask

/*
TODOs:
* fix permissions such that only netty4 can open sockets etc?
Expand Down Expand Up @@ -61,6 +63,22 @@ integTestRunner {
systemProperty 'es.set.netty.runtime.available.processors', 'false'
}

TaskProvider<Test> pooledTest = tasks.register("pooledTest", Test) {
include '**/*Tests.class'
systemProperty 'es.set.netty.runtime.available.processors', 'false'
systemProperty 'io.netty.allocator.type', 'pooled'
}
// TODO: we can't use task avoidance here because RestIntegTestTask does the testcluster creation
RestIntegTestTask pooledIntegTest = tasks.create("pooledIntegTest", RestIntegTestTask) {
runner {
systemProperty 'es.set.netty.runtime.available.processors', 'false'
}
}
testClusters.pooledIntegTest {
systemProperty 'io.netty.allocator.type', 'pooled'
}
check.dependsOn(pooledTest, pooledIntegTest)

thirdPartyAudit {
ignoreMissingClasses (
// classes are missing
Expand Down

0 comments on commit 35f8eb7

Please sign in to comment.