|
17 | 17 | * under the License. |
18 | 18 | */ |
19 | 19 |
|
| 20 | +import org.elasticsearch.gradle.test.RestIntegTestTask |
| 21 | + |
20 | 22 | /* |
21 | 23 | TODOs: |
22 | 24 | * fix permissions such that only netty4 can open sockets etc? |
@@ -67,6 +69,35 @@ integTestRunner { |
67 | 69 | systemProperty 'io.netty.allocator.numDirectArenas', '0' |
68 | 70 | } |
69 | 71 |
|
| 72 | +TaskProvider<Test> unpooledTest = tasks.register("unpooledTest", Test) { |
| 73 | + include '**/*Tests.class' |
| 74 | + systemProperty 'es.set.netty.runtime.available.processors', 'false' |
| 75 | + systemProperty 'io.netty.allocator.type', 'unpooled' |
| 76 | +} |
| 77 | +TaskProvider<Test> directBufferPoolingTest = tasks.register("directBufferPoolingTest", Test) { |
| 78 | + include '**/*Tests.class' |
| 79 | + systemProperty 'es.set.netty.runtime.available.processors', 'false' |
| 80 | + systemProperty 'io.netty.allocator.numDirectArenas', '2' |
| 81 | +} |
| 82 | +// TODO: we can't use task avoidance here because RestIntegTestTask does the testcluster creation |
| 83 | +RestIntegTestTask unpooledIntegTest = tasks.create("unpooledIntegTest", RestIntegTestTask) { |
| 84 | + runner { |
| 85 | + systemProperty 'es.set.netty.runtime.available.processors', 'false' |
| 86 | + } |
| 87 | +} |
| 88 | +testClusters.unpooledIntegTest { |
| 89 | + systemProperty 'io.netty.allocator.type', 'unpooled' |
| 90 | +} |
| 91 | +RestIntegTestTask directBufferPoolingIntegTest = tasks.create("directBufferPoolingIntegTest", RestIntegTestTask) { |
| 92 | + runner { |
| 93 | + systemProperty 'es.set.netty.runtime.available.processors', 'false' |
| 94 | + } |
| 95 | +} |
| 96 | +testClusters.directBufferPoolingIntegTest { |
| 97 | + systemProperty 'io.netty.allocator.numDirectArenas', '2' |
| 98 | +} |
| 99 | +check.dependsOn(unpooledTest, directBufferPoolingTest, unpooledIntegTest, directBufferPoolingIntegTest) |
| 100 | + |
70 | 101 | thirdPartyAudit { |
71 | 102 | ignoreMissingClasses ( |
72 | 103 | // classes are missing |
|
0 commit comments