From eb8067cbaf727586f227101d517c43e81eb78826 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 11:57:57 -0800 Subject: [PATCH 01/11] Add test-framework package to gRPC transport module. Migrate high level test utils to a test-framwork package. Purpose of this refactor is to provide test utils to dependant plugins which hide the details of the protobuf schema. Breaking schema changes are liable to cause errors in downstream plugins unexpectedly. This change quarantines details of the proto schema to the core gRPC module. Signed-off-by: Finn Carroll --- modules/transport-grpc/build.gradle | 13 + .../grpc/Netty4GrpcServerTransportTests.java | 2 + .../transport/grpc/ssl/NettyGrpcClient.java | 4 +- .../transport-grpc/test-framework/README.md | 28 ++ .../test-framework/build.gradle | 40 ++ .../licenses/failureaccess-1.0.2.jar.sha1 | 1 + .../licenses/failureaccess-LICENSE.txt | 202 ++++++++ .../licenses/failureaccess-NOTICE.txt | 0 .../test-framework/licenses/grpc-LICENSE.txt | 202 ++++++++ .../test-framework/licenses/grpc-NOTICE.txt | 62 +++ .../licenses/grpc-api-1.75.0.jar.sha1 | 1 + .../licenses/grpc-core-1.75.0.jar.sha1 | 1 + .../grpc-netty-shaded-1.75.0.jar.sha1 | 1 + .../licenses/grpc-protobuf-1.75.0.jar.sha1 | 1 + .../grpc-protobuf-lite-1.75.0.jar.sha1 | 1 + .../licenses/grpc-services-1.75.0.jar.sha1 | 1 + .../licenses/grpc-stub-1.75.0.jar.sha1 | 1 + .../licenses/grpc-util-1.75.0.jar.sha1 | 1 + .../licenses/guava-33.2.1-jre.jar.sha1 | 1 + .../test-framework/licenses/guava-LICENSE.txt | 202 ++++++++ .../test-framework/licenses/guava-NOTICE.txt | 0 .../licenses/perfmark-api-0.27.0.jar.sha1 | 1 + .../licenses/perfmark-api-LICENSE.txt | 201 ++++++++ .../licenses/perfmark-api-NOTICE.txt | 40 ++ .../licenses/protobufs-1.0.0.jar.sha1 | 1 + .../licenses/protobufs-LICENSE.txt | 475 ++++++++++++++++++ .../licenses/protobufs-NOTICE.txt | 475 ++++++++++++++++++ .../grpc/test/GrpcTestFrameworkIT.java | 60 +++ .../test/GrpcOpenSearchIntegTestCase.java | 206 ++++++++ 29 files changed, 2222 insertions(+), 2 deletions(-) create mode 100644 modules/transport-grpc/test-framework/README.md create mode 100644 modules/transport-grpc/test-framework/build.gradle create mode 100644 modules/transport-grpc/test-framework/licenses/failureaccess-1.0.2.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/failureaccess-LICENSE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/failureaccess-NOTICE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-LICENSE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-NOTICE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-api-1.75.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-core-1.75.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-netty-shaded-1.75.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-protobuf-1.75.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-protobuf-lite-1.75.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-services-1.75.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-stub-1.75.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/grpc-util-1.75.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/guava-33.2.1-jre.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/guava-LICENSE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/guava-NOTICE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/perfmark-api-0.27.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/perfmark-api-LICENSE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/perfmark-api-NOTICE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/protobufs-1.0.0.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/protobufs-LICENSE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/protobufs-NOTICE.txt create mode 100644 modules/transport-grpc/test-framework/src/internalClusterTest/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkIT.java create mode 100644 modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java diff --git a/modules/transport-grpc/build.gradle b/modules/transport-grpc/build.gradle index d6421b0673235..c6e7de94ad0dc 100644 --- a/modules/transport-grpc/build.gradle +++ b/modules/transport-grpc/build.gradle @@ -21,6 +21,19 @@ testClusters { } } +configurations { + testArtifacts.extendsFrom testImplementation +} + +task testJar(type: Jar) { + archiveClassifier = 'test' + from sourceSets.test.output +} + +artifacts { + testArtifacts testJar +} + dependencies { api project('spi') compileOnly "com.google.code.findbugs:jsr305:3.0.2" diff --git a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/Netty4GrpcServerTransportTests.java b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/Netty4GrpcServerTransportTests.java index fd3feb8a38fa3..c4b905ecd7091 100644 --- a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/Netty4GrpcServerTransportTests.java +++ b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/Netty4GrpcServerTransportTests.java @@ -18,7 +18,9 @@ import org.opensearch.threadpool.ExecutorBuilder; import org.opensearch.threadpool.FixedExecutorBuilder; import org.opensearch.threadpool.ThreadPool; + import org.opensearch.transport.grpc.ssl.NettyGrpcClient; + import org.hamcrest.MatcherAssert; import org.junit.After; import org.junit.Before; diff --git a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java index e2f3a671a2d59..30d60ead78b3b 100644 --- a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java +++ b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java @@ -8,6 +8,7 @@ package org.opensearch.transport.grpc.ssl; +import io.grpc.internal.GrpcUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.core.common.transport.TransportAddress; @@ -37,7 +38,6 @@ import static org.opensearch.transport.grpc.ssl.SecureSettingsHelpers.CLIENT_KEYSTORE; import static org.opensearch.transport.grpc.ssl.SecureSettingsHelpers.getTestKeyManagerFactory; -import static io.grpc.internal.GrpcUtil.NOOP_PROXY_DETECTOR; public class NettyGrpcClient implements AutoCloseable { private static final Logger logger = LogManager.getLogger(NettyGrpcClient.class); @@ -134,7 +134,7 @@ public Builder() {} public NettyGrpcClient build() throws SSLException { NettyChannelBuilder channelBuilder = NettyChannelBuilder.forAddress(addr.getAddress(), addr.getPort()) - .proxyDetector(NOOP_PROXY_DETECTOR); + .proxyDetector(GrpcUtil.NOOP_PROXY_DETECTOR); if (clientAuth || insecure) { SslContextBuilder builder = SslContextBuilder.forClient(); diff --git a/modules/transport-grpc/test-framework/README.md b/modules/transport-grpc/test-framework/README.md new file mode 100644 index 0000000000000..ec86c1f8e3080 --- /dev/null +++ b/modules/transport-grpc/test-framework/README.md @@ -0,0 +1,28 @@ +# OpenSearch gRPC Transport Test Framework + +The gRPC module test framework provides high-level abstractions for implementing integration tests for plugins which extend and utilize the gRPC transport. It solves the problem of breaking changes in protobuf schemas by providing stable APIs that abstract the underlying protobuf implementation details. When protobuf schemas change in the core gRPC transport module (e.g., protobuf field `SearchRequestBody` is renamed to `SearchRequest`), plugin tests that directly reference these protobuf classes break. This creates maintenance overhead and coupling between plugin tests and core implementation details. + +## Usage + +Include in plugin integration tests by adding the following dependency to build.gradle. +```gradle +dependencies { + testImplementation project(':modules:transport-grpc:test-framework') +} +``` + +Example usage of `OpenSearchIntegTestCase` and helper functions. +```java +public class MyPluginTest extends OpenSearchIntegTestCase { + + public void testMyPluginFeature() { + ManagedChannel plainTextGrpcChannel = NettyChannelBuilder.forAddress("localhost", "9200"). + proxyDetector(NOOP_PROXY_DETECTOR). + usePlaintext() + .build(); + + // Bulk ingest test documents with gRPC + doBulk(plainTextGrpcChannel, "test-index", 3); + } +} +``` diff --git a/modules/transport-grpc/test-framework/build.gradle b/modules/transport-grpc/test-framework/build.gradle new file mode 100644 index 0000000000000..de3ad60fd897c --- /dev/null +++ b/modules/transport-grpc/test-framework/build.gradle @@ -0,0 +1,40 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +apply plugin: 'opensearch.build' +apply plugin: 'opensearch.internal-cluster-test' + +description = 'gRPC Transport Test Framework for Plugin Unit and Integration Tests' + +dependencies { + api project(':test:framework') + api project(':modules:transport-grpc') + api project(path: ':modules:transport-grpc', configuration: 'testArtifacts') + + api "org.opensearch:protobufs:${versions.opensearchprotobufs}" + api "io.grpc:grpc-protobuf:${versions.grpc}" + api "io.grpc:grpc-api:${versions.grpc}" + api "io.grpc:grpc-core:${versions.grpc}" + api "io.grpc:grpc-netty-shaded:${versions.grpc}" + api "io.grpc:grpc-protobuf-lite:${versions.grpc}" + api "io.grpc:grpc-protobuf:${versions.grpc}" + api "io.grpc:grpc-services:${versions.grpc}" + api "io.grpc:grpc-stub:${versions.grpc}" + api "io.grpc:grpc-util:${versions.grpc}" + + api "junit:junit:${versions.junit}" + api "org.hamcrest:hamcrest:${versions.hamcrest}" + + compileOnly "com.google.code.findbugs:jsr305:3.0.2" + runtimeOnly "com.google.guava:guava:${versions.guava}" + implementation "com.google.guava:failureaccess:1.0.2" + implementation "io.perfmark:perfmark-api:0.27.0" + + testImplementation project(':test:framework') + internalClusterTestImplementation project(':modules:transport-grpc') +} diff --git a/modules/transport-grpc/test-framework/licenses/failureaccess-1.0.2.jar.sha1 b/modules/transport-grpc/test-framework/licenses/failureaccess-1.0.2.jar.sha1 new file mode 100644 index 0000000000000..e1dbdc6bf7320 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/failureaccess-1.0.2.jar.sha1 @@ -0,0 +1 @@ +c4a06a64e650562f30b7bf9aaec1bfed43aca12b \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/failureaccess-LICENSE.txt b/modules/transport-grpc/test-framework/licenses/failureaccess-LICENSE.txt new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/failureaccess-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/modules/transport-grpc/test-framework/licenses/failureaccess-NOTICE.txt b/modules/transport-grpc/test-framework/licenses/failureaccess-NOTICE.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/modules/transport-grpc/test-framework/licenses/grpc-LICENSE.txt b/modules/transport-grpc/test-framework/licenses/grpc-LICENSE.txt new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/modules/transport-grpc/test-framework/licenses/grpc-NOTICE.txt b/modules/transport-grpc/test-framework/licenses/grpc-NOTICE.txt new file mode 100644 index 0000000000000..f70c5620cf75a --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-NOTICE.txt @@ -0,0 +1,62 @@ +Copyright 2014 The gRPC Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +----------------------------------------------------------------------- + +This product contains a modified portion of 'OkHttp', an open source +HTTP & SPDY client for Android and Java applications, which can be obtained +at: + + * LICENSE: + * okhttp/third_party/okhttp/LICENSE (Apache License 2.0) + * HOMEPAGE: + * https://github.com/square/okhttp + * LOCATION_IN_GRPC: + * okhttp/third_party/okhttp + +This product contains a modified portion of 'Envoy', an open source +cloud-native high-performance edge/middle/service proxy, which can be +obtained at: + + * LICENSE: + * xds/third_party/envoy/LICENSE (Apache License 2.0) + * NOTICE: + * xds/third_party/envoy/NOTICE + * HOMEPAGE: + * https://www.envoyproxy.io + * LOCATION_IN_GRPC: + * xds/third_party/envoy + +This product contains a modified portion of 'protoc-gen-validate (PGV)', +an open source protoc plugin to generate polyglot message validators, +which can be obtained at: + + * LICENSE: + * xds/third_party/protoc-gen-validate/LICENSE (Apache License 2.0) + * NOTICE: + * xds/third_party/protoc-gen-validate/NOTICE + * HOMEPAGE: + * https://github.com/envoyproxy/protoc-gen-validate + * LOCATION_IN_GRPC: + * xds/third_party/protoc-gen-validate + +This product contains a modified portion of 'udpa', +an open source universal data plane API, which can be obtained at: + + * LICENSE: + * xds/third_party/udpa/LICENSE (Apache License 2.0) + * HOMEPAGE: + * https://github.com/cncf/udpa + * LOCATION_IN_GRPC: + * xds/third_party/udpa diff --git a/modules/transport-grpc/test-framework/licenses/grpc-api-1.75.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/grpc-api-1.75.0.jar.sha1 new file mode 100644 index 0000000000000..cedd356c2200c --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-api-1.75.0.jar.sha1 @@ -0,0 +1 @@ +18ddd409fb9bc0209d216854ca584d027e68210b \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/grpc-core-1.75.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/grpc-core-1.75.0.jar.sha1 new file mode 100644 index 0000000000000..9caa3d9e17e0b --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-core-1.75.0.jar.sha1 @@ -0,0 +1 @@ +c042165745c0bb4f80774ec066659dce7064aaef \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/grpc-netty-shaded-1.75.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/grpc-netty-shaded-1.75.0.jar.sha1 new file mode 100644 index 0000000000000..44fb712bbc1b1 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-netty-shaded-1.75.0.jar.sha1 @@ -0,0 +1 @@ +fc098b0cad2a1085d17dbef2356f6485d4aab88b \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/grpc-protobuf-1.75.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/grpc-protobuf-1.75.0.jar.sha1 new file mode 100644 index 0000000000000..6a9704be9c7d7 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-protobuf-1.75.0.jar.sha1 @@ -0,0 +1 @@ +860c62ef62ddf24e0f2b04459d846b269f5fa7b9 \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/grpc-protobuf-lite-1.75.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/grpc-protobuf-lite-1.75.0.jar.sha1 new file mode 100644 index 0000000000000..1a1356b915a8f --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-protobuf-lite-1.75.0.jar.sha1 @@ -0,0 +1 @@ +d6f87ed690a382c7340ff71c521daf4be3f1c7eb \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/grpc-services-1.75.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/grpc-services-1.75.0.jar.sha1 new file mode 100644 index 0000000000000..52b2fd6e3cc05 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-services-1.75.0.jar.sha1 @@ -0,0 +1 @@ +3ed3ebdc3ea91f70e67deb5af8ffca12ca0d2c5d \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/grpc-stub-1.75.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/grpc-stub-1.75.0.jar.sha1 new file mode 100644 index 0000000000000..f694d5e274c09 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-stub-1.75.0.jar.sha1 @@ -0,0 +1 @@ +2def36acc24580a2414e17339f94d10b7c057361 \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/grpc-util-1.75.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/grpc-util-1.75.0.jar.sha1 new file mode 100644 index 0000000000000..cdc753572ea31 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/grpc-util-1.75.0.jar.sha1 @@ -0,0 +1 @@ +7e947cd64e9419a1d005b22ab39ff04045e931b8 \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/guava-33.2.1-jre.jar.sha1 b/modules/transport-grpc/test-framework/licenses/guava-33.2.1-jre.jar.sha1 new file mode 100644 index 0000000000000..27d5304e326df --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/guava-33.2.1-jre.jar.sha1 @@ -0,0 +1 @@ +818e780da2c66c63bbb6480fef1f3855eeafa3e4 \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/guava-LICENSE.txt b/modules/transport-grpc/test-framework/licenses/guava-LICENSE.txt new file mode 100644 index 0000000000000..d645695673349 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/guava-LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/modules/transport-grpc/test-framework/licenses/guava-NOTICE.txt b/modules/transport-grpc/test-framework/licenses/guava-NOTICE.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/modules/transport-grpc/test-framework/licenses/perfmark-api-0.27.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/perfmark-api-0.27.0.jar.sha1 new file mode 100644 index 0000000000000..54651a33e5194 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/perfmark-api-0.27.0.jar.sha1 @@ -0,0 +1 @@ +f86f575a41b091786a4b027cd9c0c1d2e3fc1c01 diff --git a/modules/transport-grpc/test-framework/licenses/perfmark-api-LICENSE.txt b/modules/transport-grpc/test-framework/licenses/perfmark-api-LICENSE.txt new file mode 100644 index 0000000000000..261eeb9e9f8b2 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/perfmark-api-LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/modules/transport-grpc/test-framework/licenses/perfmark-api-NOTICE.txt b/modules/transport-grpc/test-framework/licenses/perfmark-api-NOTICE.txt new file mode 100644 index 0000000000000..7d74b6569cf64 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/perfmark-api-NOTICE.txt @@ -0,0 +1,40 @@ +Copyright 2019 Google LLC + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +----------------------------------------------------------------------- + +This product contains a modified portion of 'Catapult', an open source +Trace Event viewer for Chome, Linux, and Android applications, which can +be obtained at: + + * LICENSE: + * traceviewer/src/main/resources/io/perfmark/traceviewer/third_party/catapult/LICENSE (New BSD License) + * HOMEPAGE: + * https://github.com/catapult-project/catapult + +This product contains a modified portion of 'Polymer', a library for Web +Components, which can be obtained at: + * LICENSE: + * traceviewer/src/main/resources/io/perfmark/traceviewer/third_party/polymer/LICENSE (New BSD License) + * HOMEPAGE: + * https://github.com/Polymer/polymer + + +This product contains a modified portion of 'ASM', an open source +Java Bytecode library, which can be obtained at: + + * LICENSE: + * agent/src/main/resources/io/perfmark/agent/third_party/asm/LICENSE (BSD style License) + * HOMEPAGE: + * https://asm.ow2.io/ diff --git a/modules/transport-grpc/test-framework/licenses/protobufs-1.0.0.jar.sha1 b/modules/transport-grpc/test-framework/licenses/protobufs-1.0.0.jar.sha1 new file mode 100644 index 0000000000000..8daf74b220d1b --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/protobufs-1.0.0.jar.sha1 @@ -0,0 +1 @@ +495727dc62f515bd34e37dcdda976026b0aaf33a \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/protobufs-LICENSE.txt b/modules/transport-grpc/test-framework/licenses/protobufs-LICENSE.txt new file mode 100644 index 0000000000000..44cbce8f123a1 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/protobufs-LICENSE.txt @@ -0,0 +1,475 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was +derived from unicode conversion examples available at +http://www.unicode.org/Public/PROGRAMS/CVTUTF. Here is the copyright +from those sources: + +/* + * Copyright 2001-2004 Unicode, Inc. + * + * Disclaimer + * + * This source code is provided as is by Unicode, Inc. No claims are + * made as to fitness for any particular purpose. No warranties of any + * kind are expressed or implied. The recipient agrees to determine + * applicability of information provided. If this file has been + * purchased on magnetic or optical media from Unicode, Inc., the + * sole remedy for any claim will be exchange of defective media + * within 90 days of receipt. + * + * Limitations on Rights to Redistribute This Code + * + * Unicode, Inc. hereby grants the right to freely use the information + * supplied in this file in the creation of products supporting the + * Unicode Standard, and to make copies of this file in any form + * for internal or external distribution as long as this notice + * remains attached. + */ + + +Some code in core/src/java/org/apache/lucene/util/ArrayUtil.java was +derived from Python 2.4.2 sources available at +http://www.python.org. Full license is here: + + http://www.python.org/download/releases/2.4.2/license/ + +Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was +derived from Python 3.1.2 sources available at +http://www.python.org. Full license is here: + + http://www.python.org/download/releases/3.1.2/license/ + +Some code in core/src/java/org/apache/lucene/util/automaton was +derived from Brics automaton sources available at +www.brics.dk/automaton/. Here is the copyright from those sources: + +/* + * Copyright (c) 2001-2009 Anders Moeller + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +The levenshtein automata tables in core/src/java/org/apache/lucene/util/automaton +were automatically generated with the moman/finenight FSA package. +Here is the copyright for those sources: + +# Copyright (c) 2010, Jean-Philippe Barrette-LaPierre, +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was +derived from ICU (http://www.icu-project.org) +The full license is available here: + http://source.icu-project.org/repos/icu/icu/trunk/license.html + +/* + * Copyright (C) 1999-2010, International Business Machines + * Corporation and others. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, and/or sell copies of the + * Software, and to permit persons to whom the Software is furnished to do so, + * provided that the above copyright notice(s) and this permission notice appear + * in all copies of the Software and that both the above copyright notice(s) and + * this permission notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE + * LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR + * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER + * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in this Software without prior written authorization of the + * copyright holder. + */ + +The following license applies to the Snowball stemmers: + +Copyright (c) 2001, Dr Martin Porter +Copyright (c) 2002, Richard Boulton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holders nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The following license applies to the KStemmer: + +Copyright © 2003, +Center for Intelligent Information Retrieval, +University of Massachusetts, Amherst. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. The names "Center for Intelligent Information Retrieval" and +"University of Massachusetts" must not be used to endorse or promote products +derived from this software without prior written permission. To obtain +permission, contact info@ciir.cs.umass.edu. + +THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF MASSACHUSETTS AND OTHER CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +The following license applies to the Morfologik project: + +Copyright (c) 2006 Dawid Weiss +Copyright (c) 2007-2011 Dawid Weiss, Marcin Miłkowski +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Morfologik nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + +The dictionary comes from Morfologik project. Morfologik uses data from +Polish ispell/myspell dictionary hosted at http://www.sjp.pl/slownik/en/ and +is licenced on the terms of (inter alia) LGPL and Creative Commons +ShareAlike. The part-of-speech tags were added in Morfologik project and +are not found in the data from sjp.pl. The tagset is similar to IPI PAN +tagset. + +--- + +The following license applies to the Morfeusz project, +used by org.apache.lucene.analysis.morfologik. + +BSD-licensed dictionary of Polish (SGJP) +http://sgjp.pl/morfeusz/ + +Copyright © 2011 Zygmunt Saloni, Włodzimierz Gruszczyński, + Marcin Woliński, Robert Wołosz + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/modules/transport-grpc/test-framework/licenses/protobufs-NOTICE.txt b/modules/transport-grpc/test-framework/licenses/protobufs-NOTICE.txt new file mode 100644 index 0000000000000..44cbce8f123a1 --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/protobufs-NOTICE.txt @@ -0,0 +1,475 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was +derived from unicode conversion examples available at +http://www.unicode.org/Public/PROGRAMS/CVTUTF. Here is the copyright +from those sources: + +/* + * Copyright 2001-2004 Unicode, Inc. + * + * Disclaimer + * + * This source code is provided as is by Unicode, Inc. No claims are + * made as to fitness for any particular purpose. No warranties of any + * kind are expressed or implied. The recipient agrees to determine + * applicability of information provided. If this file has been + * purchased on magnetic or optical media from Unicode, Inc., the + * sole remedy for any claim will be exchange of defective media + * within 90 days of receipt. + * + * Limitations on Rights to Redistribute This Code + * + * Unicode, Inc. hereby grants the right to freely use the information + * supplied in this file in the creation of products supporting the + * Unicode Standard, and to make copies of this file in any form + * for internal or external distribution as long as this notice + * remains attached. + */ + + +Some code in core/src/java/org/apache/lucene/util/ArrayUtil.java was +derived from Python 2.4.2 sources available at +http://www.python.org. Full license is here: + + http://www.python.org/download/releases/2.4.2/license/ + +Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was +derived from Python 3.1.2 sources available at +http://www.python.org. Full license is here: + + http://www.python.org/download/releases/3.1.2/license/ + +Some code in core/src/java/org/apache/lucene/util/automaton was +derived from Brics automaton sources available at +www.brics.dk/automaton/. Here is the copyright from those sources: + +/* + * Copyright (c) 2001-2009 Anders Moeller + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +The levenshtein automata tables in core/src/java/org/apache/lucene/util/automaton +were automatically generated with the moman/finenight FSA package. +Here is the copyright for those sources: + +# Copyright (c) 2010, Jean-Philippe Barrette-LaPierre, +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +Some code in core/src/java/org/apache/lucene/util/UnicodeUtil.java was +derived from ICU (http://www.icu-project.org) +The full license is available here: + http://source.icu-project.org/repos/icu/icu/trunk/license.html + +/* + * Copyright (C) 1999-2010, International Business Machines + * Corporation and others. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, and/or sell copies of the + * Software, and to permit persons to whom the Software is furnished to do so, + * provided that the above copyright notice(s) and this permission notice appear + * in all copies of the Software and that both the above copyright notice(s) and + * this permission notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE + * LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR + * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER + * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in this Software without prior written authorization of the + * copyright holder. + */ + +The following license applies to the Snowball stemmers: + +Copyright (c) 2001, Dr Martin Porter +Copyright (c) 2002, Richard Boulton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holders nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The following license applies to the KStemmer: + +Copyright © 2003, +Center for Intelligent Information Retrieval, +University of Massachusetts, Amherst. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. The names "Center for Intelligent Information Retrieval" and +"University of Massachusetts" must not be used to endorse or promote products +derived from this software without prior written permission. To obtain +permission, contact info@ciir.cs.umass.edu. + +THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF MASSACHUSETTS AND OTHER CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +The following license applies to the Morfologik project: + +Copyright (c) 2006 Dawid Weiss +Copyright (c) 2007-2011 Dawid Weiss, Marcin Miłkowski +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Morfologik nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + +The dictionary comes from Morfologik project. Morfologik uses data from +Polish ispell/myspell dictionary hosted at http://www.sjp.pl/slownik/en/ and +is licenced on the terms of (inter alia) LGPL and Creative Commons +ShareAlike. The part-of-speech tags were added in Morfologik project and +are not found in the data from sjp.pl. The tagset is similar to IPI PAN +tagset. + +--- + +The following license applies to the Morfeusz project, +used by org.apache.lucene.analysis.morfologik. + +BSD-licensed dictionary of Polish (SGJP) +http://sgjp.pl/morfeusz/ + +Copyright © 2011 Zygmunt Saloni, Włodzimierz Gruszczyński, + Marcin Woliński, Robert Wołosz + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/modules/transport-grpc/test-framework/src/internalClusterTest/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkIT.java b/modules/transport-grpc/test-framework/src/internalClusterTest/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkIT.java new file mode 100644 index 0000000000000..a6c40b8a0088e --- /dev/null +++ b/modules/transport-grpc/test-framework/src/internalClusterTest/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkIT.java @@ -0,0 +1,60 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.transport.grpc.test; + +import io.grpc.ManagedChannel; +import org.opensearch.transport.grpc.ssl.NettyGrpcClient; + +import java.util.Arrays; +import java.util.List; + +/** + * Integration tests for the gRPC test framework utility methods. + */ +public class GrpcTestFrameworkIT extends GrpcOpenSearchIntegTestCase { + + public void testDoBulkWithAutoGeneratedDocs() throws Exception { + String indexName = "test-bulk-auto-index"; + try (NettyGrpcClient client = createGrpcClient()) { + ManagedChannel channel = client.getChannel(); + GrpcTestBulkResponse response = doBulk(channel, indexName, 5); + assertEquals("Should have 5 documents", 5, response.getCount()); + assertEquals("Should have no errors", 0, response.getErrors()); + } + } + + public void testDoBulkWithProvidedDocs() throws Exception { + String indexName = "test-bulk-provided-index"; + List docs = List.of( + "{\"title\": \"Doc 1\", \"content\": \"Content 1\"}", + "{\"title\": \"Doc 2\", \"content\": \"Content 2\"}" + ); + try (NettyGrpcClient client = createGrpcClient()) { + ManagedChannel channel = client.getChannel(); + GrpcTestBulkResponse response = doBulk(channel, indexName, docs); + assertEquals("Should have 2 documents", 2, response.getCount()); + assertEquals("Should have no errors", 0, response.getErrors()); + } + } + + public void testDoMatchAll() throws Exception { + String indexName = "test-search-index"; + try (NettyGrpcClient client = createGrpcClient()) { + ManagedChannel channel = client.getChannel(); + List docs = Arrays.asList( + "{\"field\": \"doc 0 body\"}", + "{\"field\": \"doc 1 body\"}" + ); + doBulk(channel, indexName, docs); + GrpcTestSearchResponse response = doMatchAll(channel, indexName, 10); + assertTrue("Should return results", response.getTotalCount() >= 2); + assertNotNull("Document source should not be null", response.getDocumentSource(0)); + } + } +} diff --git a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java new file mode 100644 index 0000000000000..86119f3c6ce5e --- /dev/null +++ b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java @@ -0,0 +1,206 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.transport.grpc.test; + +import com.google.protobuf.ByteString; +import io.grpc.ManagedChannel; +import org.opensearch.common.settings.Settings; +import org.opensearch.core.common.transport.TransportAddress; +import org.opensearch.plugins.Plugin; +import org.opensearch.protobufs.BulkRequest; +import org.opensearch.protobufs.BulkRequestBody; +import org.opensearch.protobufs.BulkResponse; +import org.opensearch.protobufs.IndexOperation; +import org.opensearch.protobufs.Item; +import org.opensearch.protobufs.MatchAllQuery; +import org.opensearch.protobufs.OperationContainer; +import org.opensearch.protobufs.QueryContainer; +import org.opensearch.protobufs.Refresh; +import org.opensearch.protobufs.SearchRequest; +import org.opensearch.protobufs.SearchRequestBody; +import org.opensearch.protobufs.SearchResponse; +import org.opensearch.protobufs.services.DocumentServiceGrpc; +import org.opensearch.protobufs.services.SearchServiceGrpc; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.transport.grpc.GrpcPlugin; +import org.opensearch.transport.grpc.Netty4GrpcServerTransport; +import org.opensearch.transport.grpc.ssl.NettyGrpcClient; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import static org.opensearch.transport.AuxTransport.AUX_TRANSPORT_TYPES_KEY; +import static org.opensearch.transport.grpc.Netty4GrpcServerTransport.GRPC_TRANSPORT_SETTING_KEY; + +/** + * Base test class for gRPC transport integration tests. + */ +public abstract class GrpcOpenSearchIntegTestCase extends OpenSearchIntegTestCase { + + public static class GrpcTestBulkResponse { + private final BulkResponse protoBulkResponse; + + GrpcTestBulkResponse(BulkResponse protoBulkResponse){ + this.protoBulkResponse = protoBulkResponse; + } + + public int getCount() { + return protoBulkResponse.getItemsCount(); + } + + public int getErrors() { + int errors = 0; + for (int i = 0; i < protoBulkResponse.getItemsCount(); i++) { + Item item = protoBulkResponse.getItems(i); + Item.ItemCase itemCase = item.getItemCase(); + switch (itemCase) { + case CREATE -> { + if (item.hasCreate() && item.getCreate().hasError()) { + errors++; + } + } + case DELETE -> { + if (item.hasDelete() && item.getDelete().hasError()) { + errors++; + } + } + case INDEX -> { + if (item.hasIndex() && item.getIndex().hasError()) { + errors++; + } + } + case UPDATE -> { + if (item.hasUpdate() && item.getUpdate().hasError()) { + errors++; + } + } + case ITEM_NOT_SET -> { + } + } + } + return errors; + } + } + + public static class GrpcTestSearchResponse { + private final SearchResponse protoSearchResponse; + + GrpcTestSearchResponse(SearchResponse protoSearchResponse) { + this.protoSearchResponse = protoSearchResponse; + } + + public long getTotalCount() { + return protoSearchResponse.getHits().getTotal().getTotalHits().getValue(); + } + + public String getDocumentSource(int i) { + return protoSearchResponse.getHits().getHits(i).getXSource().toString(); + } + } + + /** + * Gets a random gRPC transport address from the cluster. + * + * @return A random transport address + */ + protected TransportAddress randomNetty4GrpcServerTransportAddr() { + List addresses = new ArrayList<>(); + for (Netty4GrpcServerTransport transport : internalCluster().getInstances(Netty4GrpcServerTransport.class)) { + TransportAddress tAddr = new TransportAddress(transport.getBoundAddress().publishAddress().address()); + addresses.add(tAddr); + } + return randomFrom(addresses); + } + + /** + * Configures node settings for gRPC transport. + */ + @Override + protected Settings nodeSettings(int nodeOrdinal) { + return Settings.builder().put(super.nodeSettings(nodeOrdinal)).put(AUX_TRANSPORT_TYPES_KEY, GRPC_TRANSPORT_SETTING_KEY).build(); + } + + /** + * Configures plugins for gRPC transport. + */ + @Override + protected Collection> nodePlugins() { + return Collections.singleton(GrpcPlugin.class); + } + + /** + * Creates a gRPC client connected to a random node. + * @return A new NettyGrpcClient instance + * @throws javax.net.ssl.SSLException if there's an SSL error + */ + protected NettyGrpcClient createGrpcClient() throws javax.net.ssl.SSLException { + return new NettyGrpcClient.Builder().setAddress(randomNetty4GrpcServerTransportAddr()).build(); + } + + /** + * Helper method to index a number of auto generated test documents. + * Documents generated with the form: { "field": "doc 2 body" } + * @param channel The gRPC channel to use for the indexing operation. + * @param index The index to which documents should be indexed. + * @param numDocs The number of documents to generate and index. + * @return A GrpcTestBulkResponse containing the results of the indexing operation. + */ + protected static GrpcTestBulkResponse doBulk(ManagedChannel channel, String index, long numDocs) { + BulkRequest.Builder requestBuilder = BulkRequest.newBuilder().setRefresh(Refresh.REFRESH_TRUE).setIndex(index); + + for(int i = 0; (long)i < numDocs; ++i) { + String docBody = "{\n \"field\": \"doc %d body\"\n}\n".formatted(i); + IndexOperation.Builder indexOp = IndexOperation.newBuilder().setXId(String.valueOf(i)); + OperationContainer.Builder opCont = OperationContainer.newBuilder().setIndex(indexOp); + BulkRequestBody requestBody = BulkRequestBody.newBuilder().setOperationContainer(opCont).setObject(ByteString.copyFromUtf8(docBody)).build(); + requestBuilder.addBulkRequestBody(requestBody); + } + + DocumentServiceGrpc.DocumentServiceBlockingStub stub = DocumentServiceGrpc.newBlockingStub(channel); + return new GrpcTestBulkResponse(stub.bulk(requestBuilder.build())); + } + + /** + * Helper method to index a number of provided test documents. + * @param channel The gRPC channel to use for the indexing operation. + * @param index The index to which documents should be indexed. + * @param docs List of test documents to index. + * @return A GrpcTestBulkResponse containing the results of the indexing operation. + */ + protected static GrpcTestBulkResponse doBulk(ManagedChannel channel, String index, List docs) { + BulkRequest.Builder requestBuilder = BulkRequest.newBuilder().setRefresh(Refresh.REFRESH_TRUE).setIndex(index); + + for (String doc : docs) { + IndexOperation.Builder indexOp = IndexOperation.newBuilder(); + OperationContainer.Builder opCont = OperationContainer.newBuilder().setIndex(indexOp); + BulkRequestBody requestBody = BulkRequestBody.newBuilder().setOperationContainer(opCont).setObject(ByteString.copyFromUtf8(doc)).build(); + requestBuilder.addBulkRequestBody(requestBody); + } + + DocumentServiceGrpc.DocumentServiceBlockingStub stub = DocumentServiceGrpc.newBlockingStub(channel); + return new GrpcTestBulkResponse(stub.bulk(requestBuilder.build())); + } + + /** + * Helper method to perform a match-all search operation. + * @param channel The gRPC channel to use for the search operation. + * @param index The index to search. + * @param size The maximum number of results to return. + * @return A GrpcTestSearchResponse containing the results of the search operation. + */ + protected static GrpcTestSearchResponse doMatchAll(ManagedChannel channel, String index, int size) { + QueryContainer query = QueryContainer.newBuilder().setMatchAll(MatchAllQuery.newBuilder().build()).build(); + SearchRequestBody requestBody = SearchRequestBody.newBuilder().setSize(size).setQuery(query).build(); + SearchRequest searchRequest = SearchRequest.newBuilder().addIndex(index).setSearchRequestBody(requestBody).build(); + SearchServiceGrpc.SearchServiceBlockingStub stub = SearchServiceGrpc.newBlockingStub(channel); + return new GrpcTestSearchResponse(stub.search(searchRequest)); + } +} From b676c8776fd8a1746d48242e26f1097e7167abf7 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 14:44:13 -0800 Subject: [PATCH 02/11] Remove un-needed junit dependency & licenses. Signed-off-by: Finn Carroll --- CHANGELOG.md | 1 + .../grpc/Netty4GrpcServerTransportTests.java | 2 -- .../transport/grpc/ssl/NettyGrpcClient.java | 2 +- .../test-framework/build.gradle | 5 ++++- .../licenses/junit-4.13.2.jar.sha1 | 1 + .../test-framework/licenses/junit-LICENSE.txt | 22 +++++++++++++++++++ .../test-framework/licenses/junit-NOTICE.txt | 0 .../grpc/test/GrpcTestFrameworkIT.java | 8 +++---- .../test/GrpcOpenSearchIntegTestCase.java | 20 ++++++++++++----- 9 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 modules/transport-grpc/test-framework/licenses/junit-4.13.2.jar.sha1 create mode 100644 modules/transport-grpc/test-framework/licenses/junit-LICENSE.txt create mode 100644 modules/transport-grpc/test-framework/licenses/junit-NOTICE.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eced5d5b2a42..b645edd41dcd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added - Add support for forward translog reading ([#20163](https://github.com/opensearch-project/OpenSearch/pull/20163)) - Added public getter method in `SourceFieldMapper` to return excluded field ([#20205](https://github.com/opensearch-project/OpenSearch/pull/20205)) +- Add test-framework for gRPC transport module ([#20383](https://github.com/opensearch-project/OpenSearch/pull/20383)) - Add integ test for simulating node join left event when data node cluster state publication lag because the cluster applier thread being busy ([#19907](https://github.com/opensearch-project/OpenSearch/pull/19907)). - Relax jar hell check when extended plugins share transitive dependencies ([#20103](https://github.com/opensearch-project/OpenSearch/pull/20103)) - Added public getter method in `SourceFieldMapper` to return included field ([#20290](https://github.com/opensearch-project/OpenSearch/pull/20290)) diff --git a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/Netty4GrpcServerTransportTests.java b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/Netty4GrpcServerTransportTests.java index c4b905ecd7091..fd3feb8a38fa3 100644 --- a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/Netty4GrpcServerTransportTests.java +++ b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/Netty4GrpcServerTransportTests.java @@ -18,9 +18,7 @@ import org.opensearch.threadpool.ExecutorBuilder; import org.opensearch.threadpool.FixedExecutorBuilder; import org.opensearch.threadpool.ThreadPool; - import org.opensearch.transport.grpc.ssl.NettyGrpcClient; - import org.hamcrest.MatcherAssert; import org.junit.After; import org.junit.Before; diff --git a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java index 30d60ead78b3b..747a5897f732b 100644 --- a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java +++ b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java @@ -8,7 +8,6 @@ package org.opensearch.transport.grpc.ssl; -import io.grpc.internal.GrpcUtil; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.core.common.transport.TransportAddress; @@ -24,6 +23,7 @@ import io.grpc.health.v1.HealthCheckRequest; import io.grpc.health.v1.HealthCheckResponse; import io.grpc.health.v1.HealthGrpc; +import io.grpc.internal.GrpcUtil; import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; import io.grpc.netty.shaded.io.netty.handler.ssl.ApplicationProtocolConfig; import io.grpc.netty.shaded.io.netty.handler.ssl.ApplicationProtocolNames; diff --git a/modules/transport-grpc/test-framework/build.gradle b/modules/transport-grpc/test-framework/build.gradle index de3ad60fd897c..b867f78cd2ddd 100644 --- a/modules/transport-grpc/test-framework/build.gradle +++ b/modules/transport-grpc/test-framework/build.gradle @@ -28,7 +28,6 @@ dependencies { api "io.grpc:grpc-util:${versions.grpc}" api "junit:junit:${versions.junit}" - api "org.hamcrest:hamcrest:${versions.hamcrest}" compileOnly "com.google.code.findbugs:jsr305:3.0.2" runtimeOnly "com.google.guava:guava:${versions.guava}" @@ -38,3 +37,7 @@ dependencies { testImplementation project(':test:framework') internalClusterTestImplementation project(':modules:transport-grpc') } + +tasks.named("dependencyLicenses").configure { + mapping from: /grpc-.*/, to: 'grpc' +} diff --git a/modules/transport-grpc/test-framework/licenses/junit-4.13.2.jar.sha1 b/modules/transport-grpc/test-framework/licenses/junit-4.13.2.jar.sha1 new file mode 100644 index 0000000000000..7d065692bff1a --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/junit-4.13.2.jar.sha1 @@ -0,0 +1 @@ +8ac9e16d933b6fb43bc7f576336b8f4d7eb5ba12 \ No newline at end of file diff --git a/modules/transport-grpc/test-framework/licenses/junit-LICENSE.txt b/modules/transport-grpc/test-framework/licenses/junit-LICENSE.txt new file mode 100644 index 0000000000000..803baec32939c --- /dev/null +++ b/modules/transport-grpc/test-framework/licenses/junit-LICENSE.txt @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/modules/transport-grpc/test-framework/licenses/junit-NOTICE.txt b/modules/transport-grpc/test-framework/licenses/junit-NOTICE.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/modules/transport-grpc/test-framework/src/internalClusterTest/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkIT.java b/modules/transport-grpc/test-framework/src/internalClusterTest/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkIT.java index a6c40b8a0088e..d1ca84ef79d69 100644 --- a/modules/transport-grpc/test-framework/src/internalClusterTest/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkIT.java +++ b/modules/transport-grpc/test-framework/src/internalClusterTest/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkIT.java @@ -8,12 +8,13 @@ package org.opensearch.transport.grpc.test; -import io.grpc.ManagedChannel; import org.opensearch.transport.grpc.ssl.NettyGrpcClient; import java.util.Arrays; import java.util.List; +import io.grpc.ManagedChannel; + /** * Integration tests for the gRPC test framework utility methods. */ @@ -47,10 +48,7 @@ public void testDoMatchAll() throws Exception { String indexName = "test-search-index"; try (NettyGrpcClient client = createGrpcClient()) { ManagedChannel channel = client.getChannel(); - List docs = Arrays.asList( - "{\"field\": \"doc 0 body\"}", - "{\"field\": \"doc 1 body\"}" - ); + List docs = Arrays.asList("{\"field\": \"doc 0 body\"}", "{\"field\": \"doc 1 body\"}"); doBulk(channel, indexName, docs); GrpcTestSearchResponse response = doMatchAll(channel, indexName, 10); assertTrue("Should return results", response.getTotalCount() >= 2); diff --git a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java index 86119f3c6ce5e..076809f6e8474 100644 --- a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java +++ b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java @@ -9,7 +9,6 @@ package org.opensearch.transport.grpc.test; import com.google.protobuf.ByteString; -import io.grpc.ManagedChannel; import org.opensearch.common.settings.Settings; import org.opensearch.core.common.transport.TransportAddress; import org.opensearch.plugins.Plugin; @@ -36,6 +35,9 @@ import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.Locale; + +import io.grpc.ManagedChannel; import static org.opensearch.transport.AuxTransport.AUX_TRANSPORT_TYPES_KEY; import static org.opensearch.transport.grpc.Netty4GrpcServerTransport.GRPC_TRANSPORT_SETTING_KEY; @@ -48,7 +50,7 @@ public abstract class GrpcOpenSearchIntegTestCase extends OpenSearchIntegTestCas public static class GrpcTestBulkResponse { private final BulkResponse protoBulkResponse; - GrpcTestBulkResponse(BulkResponse protoBulkResponse){ + GrpcTestBulkResponse(BulkResponse protoBulkResponse) { this.protoBulkResponse = protoBulkResponse; } @@ -156,11 +158,14 @@ protected NettyGrpcClient createGrpcClient() throws javax.net.ssl.SSLException { protected static GrpcTestBulkResponse doBulk(ManagedChannel channel, String index, long numDocs) { BulkRequest.Builder requestBuilder = BulkRequest.newBuilder().setRefresh(Refresh.REFRESH_TRUE).setIndex(index); - for(int i = 0; (long)i < numDocs; ++i) { - String docBody = "{\n \"field\": \"doc %d body\"\n}\n".formatted(i); + for (int i = 0; (long) i < numDocs; ++i) { + String docBody = String.format(Locale.ROOT, "{\n \"field\": \"doc %d body\"\n}\n", i); IndexOperation.Builder indexOp = IndexOperation.newBuilder().setXId(String.valueOf(i)); OperationContainer.Builder opCont = OperationContainer.newBuilder().setIndex(indexOp); - BulkRequestBody requestBody = BulkRequestBody.newBuilder().setOperationContainer(opCont).setObject(ByteString.copyFromUtf8(docBody)).build(); + BulkRequestBody requestBody = BulkRequestBody.newBuilder() + .setOperationContainer(opCont) + .setObject(ByteString.copyFromUtf8(docBody)) + .build(); requestBuilder.addBulkRequestBody(requestBody); } @@ -181,7 +186,10 @@ protected static GrpcTestBulkResponse doBulk(ManagedChannel channel, String inde for (String doc : docs) { IndexOperation.Builder indexOp = IndexOperation.newBuilder(); OperationContainer.Builder opCont = OperationContainer.newBuilder().setIndex(indexOp); - BulkRequestBody requestBody = BulkRequestBody.newBuilder().setOperationContainer(opCont).setObject(ByteString.copyFromUtf8(doc)).build(); + BulkRequestBody requestBody = BulkRequestBody.newBuilder() + .setOperationContainer(opCont) + .setObject(ByteString.copyFromUtf8(doc)) + .build(); requestBuilder.addBulkRequestBody(requestBody); } From eae2b4680c5313930dcc52b6e4ead7816a02e313 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 14:58:02 -0800 Subject: [PATCH 03/11] Add some trivial unit tests - Testing convention requires unit tests. Signed-off-by: Finn Carroll --- .../test/GrpcOpenSearchIntegTestCase.java | 50 +++++++++++++------ .../grpc/test/GrpcTestFrameworkTests.java | 36 +++++++++++++ 2 files changed, 71 insertions(+), 15 deletions(-) create mode 100644 modules/transport-grpc/test-framework/src/test/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkTests.java diff --git a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java index 076809f6e8474..13d997252ef22 100644 --- a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java +++ b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java @@ -18,6 +18,8 @@ import org.opensearch.protobufs.IndexOperation; import org.opensearch.protobufs.Item; import org.opensearch.protobufs.MatchAllQuery; + +import java.util.ArrayList; import org.opensearch.protobufs.OperationContainer; import org.opensearch.protobufs.QueryContainer; import org.opensearch.protobufs.Refresh; @@ -108,20 +110,6 @@ public String getDocumentSource(int i) { } } - /** - * Gets a random gRPC transport address from the cluster. - * - * @return A random transport address - */ - protected TransportAddress randomNetty4GrpcServerTransportAddr() { - List addresses = new ArrayList<>(); - for (Netty4GrpcServerTransport transport : internalCluster().getInstances(Netty4GrpcServerTransport.class)) { - TransportAddress tAddr = new TransportAddress(transport.getBoundAddress().publishAddress().address()); - addresses.add(tAddr); - } - return randomFrom(addresses); - } - /** * Configures node settings for gRPC transport. */ @@ -147,6 +135,38 @@ protected NettyGrpcClient createGrpcClient() throws javax.net.ssl.SSLException { return new NettyGrpcClient.Builder().setAddress(randomNetty4GrpcServerTransportAddr()).build(); } + /** + * Gets a random gRPC transport address from the cluster. + * + * @return A random transport address + */ + protected TransportAddress randomNetty4GrpcServerTransportAddr() { + List addresses = new ArrayList<>(); + for (Netty4GrpcServerTransport transport : internalCluster().getInstances(Netty4GrpcServerTransport.class)) { + TransportAddress tAddr = new TransportAddress(transport.getBoundAddress().publishAddress().address()); + addresses.add(tAddr); + } + return randomFrom(addresses); + } + + /** + * Creates a test document with the specified field and value. + */ + protected static String createTestDocument(String field, String value) { + return String.format(Locale.ROOT, "{\"%s\": \"%s\"}", field, value); + } + + /** + * Creates a list of test documents with sequential numbering. + */ + protected static List createTestDocuments(String field, String prefix, int count) { + List docs = new ArrayList<>(); + for (int i = 0; i < count; i++) { + docs.add(createTestDocument(field, prefix + " " + i)); + } + return docs; + } + /** * Helper method to index a number of auto generated test documents. * Documents generated with the form: { "field": "doc 2 body" } @@ -159,7 +179,7 @@ protected static GrpcTestBulkResponse doBulk(ManagedChannel channel, String inde BulkRequest.Builder requestBuilder = BulkRequest.newBuilder().setRefresh(Refresh.REFRESH_TRUE).setIndex(index); for (int i = 0; (long) i < numDocs; ++i) { - String docBody = String.format(Locale.ROOT, "{\n \"field\": \"doc %d body\"\n}\n", i); + String docBody = createTestDocument("field", String.valueOf(i)); IndexOperation.Builder indexOp = IndexOperation.newBuilder().setXId(String.valueOf(i)); OperationContainer.Builder opCont = OperationContainer.newBuilder().setIndex(indexOp); BulkRequestBody requestBody = BulkRequestBody.newBuilder() diff --git a/modules/transport-grpc/test-framework/src/test/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkTests.java b/modules/transport-grpc/test-framework/src/test/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkTests.java new file mode 100644 index 0000000000000..2179dbe6dada7 --- /dev/null +++ b/modules/transport-grpc/test-framework/src/test/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkTests.java @@ -0,0 +1,36 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.transport.grpc.test; + +import org.junit.Test; + +import java.util.List; + +import static org.junit.Assert.*; + +/** + * Unit tests for gRPC test framework utilities. + */ +public class GrpcTestFrameworkTests { + + @Test + public void testCreateTestDocument() { + String doc = GrpcOpenSearchIntegTestCase.createTestDocument("name", "test-value"); + assertEquals("Should create proper JSON", "{\"name\": \"test-value\"}", doc); + } + + @Test + public void testCreateTestDocuments() { + List docs = GrpcOpenSearchIntegTestCase.createTestDocuments("field", "doc", 3); + assertEquals("Should create 3 documents", 3, docs.size()); + assertEquals("First doc should be correct", "{\"field\": \"doc 0\"}", docs.get(0)); + assertEquals("Second doc should be correct", "{\"field\": \"doc 1\"}", docs.get(1)); + assertEquals("Last doc should be correct", "{\"field\": \"doc 2\"}", docs.get(2)); + } +} From 0c8022d9caf242d3b6cb7ea8e9a29062ca975ad6 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 15:08:07 -0800 Subject: [PATCH 04/11] Spotless apply Signed-off-by: Finn Carroll --- .../test-framework/build.gradle | 106 ++++++++++++++++++ .../test/GrpcOpenSearchIntegTestCase.java | 2 - .../grpc/test/GrpcTestFrameworkTests.java | 8 +- 3 files changed, 108 insertions(+), 8 deletions(-) diff --git a/modules/transport-grpc/test-framework/build.gradle b/modules/transport-grpc/test-framework/build.gradle index b867f78cd2ddd..85e84168c2d96 100644 --- a/modules/transport-grpc/test-framework/build.gradle +++ b/modules/transport-grpc/test-framework/build.gradle @@ -41,3 +41,109 @@ dependencies { tasks.named("dependencyLicenses").configure { mapping from: /grpc-.*/, to: 'grpc' } + +thirdPartyAudit { + ignoreMissingClasses( + 'com.aayushatharva.brotli4j.Brotli4jLoader', + 'com.aayushatharva.brotli4j.decoder.DecoderJNI$Status', + 'com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper', + 'com.aayushatharva.brotli4j.encoder.BrotliEncoderChannel', + 'com.aayushatharva.brotli4j.encoder.Encoder$Mode', + 'com.aayushatharva.brotli4j.encoder.Encoder$Parameters', + 'com.google.gson.stream.JsonReader', + 'com.google.gson.stream.JsonToken', + 'com.google.protobuf.nano.CodedOutputByteBufferNano', + 'com.google.protobuf.nano.MessageNano', + 'com.google.protobuf.util.Durations', + 'com.google.protobuf.util.Timestamps', + 'com.google.rpc.Status', + 'com.google.rpc.Status$Builder', + 'com.ning.compress.BufferRecycler', + 'com.ning.compress.lzf.ChunkDecoder', + 'com.ning.compress.lzf.ChunkEncoder', + 'com.ning.compress.lzf.LZFChunk', + 'com.ning.compress.lzf.LZFEncoder', + 'com.ning.compress.lzf.util.ChunkDecoderFactory', + 'com.ning.compress.lzf.util.ChunkEncoderFactory', + 'lzma.sdk.lzma.Encoder', + 'net.jpountz.lz4.LZ4Compressor', + 'net.jpountz.lz4.LZ4Factory', + 'net.jpountz.lz4.LZ4FastDecompressor', + 'net.jpountz.xxhash.XXHash32', + 'net.jpountz.xxhash.XXHashFactory', + 'org.apache.log4j.Level', + 'org.apache.log4j.Logger', + 'org.bouncycastle.cert.X509v3CertificateBuilder', + 'org.bouncycastle.cert.jcajce.JcaX509CertificateConverter', + 'org.bouncycastle.openssl.PEMEncryptedKeyPair', + 'org.bouncycastle.openssl.PEMParser', + 'org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter', + 'org.bouncycastle.openssl.jcajce.JceOpenSSLPKCS8DecryptorProviderBuilder', + 'org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder', + 'org.bouncycastle.operator.jcajce.JcaContentSignerBuilder', + 'org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo', + 'org.conscrypt.AllocatedBuffer', + 'org.conscrypt.BufferAllocator', + 'org.conscrypt.Conscrypt', + 'org.conscrypt.HandshakeListener', + 'org.eclipse.jetty.alpn.ALPN', + 'org.eclipse.jetty.alpn.ALPN$ClientProvider', + 'org.eclipse.jetty.alpn.ALPN$ServerProvider', + 'org.eclipse.jetty.npn.NextProtoNego', + 'org.eclipse.jetty.npn.NextProtoNego$ClientProvider', + 'org.eclipse.jetty.npn.NextProtoNego$ServerProvider', + 'org.jboss.marshalling.ByteInput', + 'org.jboss.marshalling.ByteOutput', + 'org.jboss.marshalling.Marshaller', + 'org.jboss.marshalling.MarshallerFactory', + 'org.jboss.marshalling.MarshallingConfiguration', + 'org.jboss.marshalling.Unmarshaller', + 'reactor.blockhound.BlockHound$Builder', + 'reactor.blockhound.integration.BlockHoundIntegration' + ) + + ignoreViolations( + 'com.google.common.cache.Striped64', + 'com.google.common.cache.Striped64$1', + 'com.google.common.cache.Striped64$Cell', + 'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray', + 'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$1', + 'com.google.common.hash.LittleEndianByteArray$UnsafeByteArray$2', + 'com.google.common.hash.Striped64', + 'com.google.common.hash.Striped64$1', + 'com.google.common.hash.Striped64$Cell', + 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator', + 'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1', + 'com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper', + 'com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper$1', + 'io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator', + 'io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$1', + 'io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$2', + 'io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$3', + 'io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$4', + 'io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator$5', + 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0', + 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$1', + 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$2', + 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$3', + 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$4', + 'io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$6', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.BaseLinkedQueueConsumerNodeRef', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.BaseLinkedQueueProducerNodeRef', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueColdProducerFields', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueConsumerFields', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueProducerFields', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.LinkedQueueNode', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.MpmcArrayQueueConsumerIndexField', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.MpmcArrayQueueProducerIndexField', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueConsumerIndexField', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerIndexField', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.MpscArrayQueueProducerLimitField', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueueConsumerIndexField', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueueProducerIndexField', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.unpadded.MpscUnpaddedArrayQueueProducerLimitField', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.util.UnsafeLongArrayAccess', + 'io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.util.UnsafeRefArrayAccess' + ) +} diff --git a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java index 13d997252ef22..d3b86d455d5c3 100644 --- a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java +++ b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java @@ -18,8 +18,6 @@ import org.opensearch.protobufs.IndexOperation; import org.opensearch.protobufs.Item; import org.opensearch.protobufs.MatchAllQuery; - -import java.util.ArrayList; import org.opensearch.protobufs.OperationContainer; import org.opensearch.protobufs.QueryContainer; import org.opensearch.protobufs.Refresh; diff --git a/modules/transport-grpc/test-framework/src/test/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkTests.java b/modules/transport-grpc/test-framework/src/test/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkTests.java index 2179dbe6dada7..b4cbd30da2c84 100644 --- a/modules/transport-grpc/test-framework/src/test/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkTests.java +++ b/modules/transport-grpc/test-framework/src/test/java/org/opensearch/transport/grpc/test/GrpcTestFrameworkTests.java @@ -8,24 +8,20 @@ package org.opensearch.transport.grpc.test; -import org.junit.Test; +import org.opensearch.test.OpenSearchTestCase; import java.util.List; -import static org.junit.Assert.*; - /** * Unit tests for gRPC test framework utilities. */ -public class GrpcTestFrameworkTests { +public class GrpcTestFrameworkTests extends OpenSearchTestCase { - @Test public void testCreateTestDocument() { String doc = GrpcOpenSearchIntegTestCase.createTestDocument("name", "test-value"); assertEquals("Should create proper JSON", "{\"name\": \"test-value\"}", doc); } - @Test public void testCreateTestDocuments() { List docs = GrpcOpenSearchIntegTestCase.createTestDocuments("field", "doc", 3); assertEquals("Should create 3 documents", 3, docs.size()); From 75766da20edb74d5a3e89c8cceb054e26de5c6fd Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 15:17:11 -0800 Subject: [PATCH 05/11] Add gradle test commands to top level readme. Signed-off-by: Finn Carroll --- modules/transport-grpc/README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/modules/transport-grpc/README.md b/modules/transport-grpc/README.md index 81e353bc3f2f7..4b1ae8d9c8a2b 100644 --- a/modules/transport-grpc/README.md +++ b/modules/transport-grpc/README.md @@ -71,18 +71,32 @@ curl -X GET "localhost:9200/_nodes/stats/thread_pool?filter_path=nodes.*.thread_ ## Testing -### Unit Tests +### Module Tests ```bash ./gradlew :modules:transport-grpc:test ``` -### Integration Tests - ```bash ./gradlew :modules:transport-grpc:internalClusterTest ``` +### Test Framework Tests + +```bash +./gradlew modules:transport-grpc:test-framework:test +``` + +```bash +./gradlew modules:transport-grpc:test-framework:internalClusterTest +``` + +### SPI Tests + +```bash +./gradlew :modules:transport-grpc:spi:test +``` + ### Running OpenSearch with gRPC Enabled To run OpenSearch with the gRPC transport enabled: From f38b6ef437542045fcba1c4a77e29819f3f0ff85 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 15:30:27 -0800 Subject: [PATCH 06/11] Javadocs. Signed-off-by: Finn Carroll --- .../test/GrpcOpenSearchIntegTestCase.java | 47 ++++++++++++++++++- .../transport/grpc/test/package-info.java | 15 ++++++ 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/package-info.java diff --git a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java index d3b86d455d5c3..fd2dadfcb1fce 100644 --- a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java +++ b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java @@ -43,10 +43,22 @@ import static org.opensearch.transport.grpc.Netty4GrpcServerTransport.GRPC_TRANSPORT_SETTING_KEY; /** - * Base test class for gRPC transport integration tests. + * Base test case for gRPC transport integration tests. + * Provides utilities for testing plugins that use gRPC transport. */ public abstract class GrpcOpenSearchIntegTestCase extends OpenSearchIntegTestCase { + /** + * Constructor for GrpcOpenSearchIntegTestCase. + */ + protected GrpcOpenSearchIntegTestCase() { + super(); + } + + /** + * Response wrapper for gRPC bulk operations. + * Provides a high level summary which abstracts away schema details. + */ public static class GrpcTestBulkResponse { private final BulkResponse protoBulkResponse; @@ -54,10 +66,18 @@ public static class GrpcTestBulkResponse { this.protoBulkResponse = protoBulkResponse; } + /** + * Gets the number of successfully indexed documents. + * @return the count of indexed documents + */ public int getCount() { return protoBulkResponse.getItemsCount(); } + /** + * Gets the number of errors during bulk operation. + * @return the error count + */ public int getErrors() { int errors = 0; for (int i = 0; i < protoBulkResponse.getItemsCount(); i++) { @@ -92,6 +112,10 @@ public int getErrors() { } } + /** + * Response wrapper for gRPC search operations. + * Provides a high level summary which abstracts away schema details. + */ public static class GrpcTestSearchResponse { private final SearchResponse protoSearchResponse; @@ -99,10 +123,19 @@ public static class GrpcTestSearchResponse { this.protoSearchResponse = protoSearchResponse; } + /** + * Gets the total number of search hits. + * @return the total hit count + */ public long getTotalCount() { return protoSearchResponse.getHits().getTotal().getTotalHits().getValue(); } + /** + * Gets the source of a document at the specified index. + * @param i the index of the document + * @return the document source as a string, or null if index is out of bounds + */ public String getDocumentSource(int i) { return protoSearchResponse.getHits().getHits(i).getXSource().toString(); } @@ -110,6 +143,8 @@ public String getDocumentSource(int i) { /** * Configures node settings for gRPC transport. + * @param nodeOrdinal the ordinal number of the node + * @return the configured settings */ @Override protected Settings nodeSettings(int nodeOrdinal) { @@ -135,7 +170,6 @@ protected NettyGrpcClient createGrpcClient() throws javax.net.ssl.SSLException { /** * Gets a random gRPC transport address from the cluster. - * * @return A random transport address */ protected TransportAddress randomNetty4GrpcServerTransportAddr() { @@ -149,6 +183,10 @@ protected TransportAddress randomNetty4GrpcServerTransportAddr() { /** * Creates a test document with the specified field and value. + * Useful for dependent plugins to generate consistent test data. + * @param field the field name + * @param value the field value + * @return a JSON string representing the document */ protected static String createTestDocument(String field, String value) { return String.format(Locale.ROOT, "{\"%s\": \"%s\"}", field, value); @@ -156,6 +194,11 @@ protected static String createTestDocument(String field, String value) { /** * Creates a list of test documents with sequential numbering. + * Useful for bulk operations in dependent plugin tests. + * @param field the field name for each document + * @param prefix the prefix for field values + * @param count the number of documents to create + * @return a list of JSON document strings */ protected static List createTestDocuments(String field, String prefix, int count) { List docs = new ArrayList<>(); diff --git a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/package-info.java b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/package-info.java new file mode 100644 index 0000000000000..67222d8172a15 --- /dev/null +++ b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/package-info.java @@ -0,0 +1,15 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/** + * gRPC Transport Test Framework for OpenSearch plugins. + * + * This package provides test utilities and base classes for plugins that use gRPC transport, + * abstracting away protobuf schema details and providing convenient test methods. + */ +package org.opensearch.transport.grpc.test; From 1dca8b6dd3ae6f0e8c55b5f96e6482f435cec2bd Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 16:05:29 -0800 Subject: [PATCH 07/11] Remove use of GrpcUtil.NOOP_PROXY_DETECTOR. API is not stable in gRPC libs. Signed-off-by: Finn Carroll --- .../org/opensearch/transport/grpc/ssl/NettyGrpcClient.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java index 747a5897f732b..7c1317b209381 100644 --- a/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java +++ b/modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/ssl/NettyGrpcClient.java @@ -23,7 +23,6 @@ import io.grpc.health.v1.HealthCheckRequest; import io.grpc.health.v1.HealthCheckResponse; import io.grpc.health.v1.HealthGrpc; -import io.grpc.internal.GrpcUtil; import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; import io.grpc.netty.shaded.io.netty.handler.ssl.ApplicationProtocolConfig; import io.grpc.netty.shaded.io.netty.handler.ssl.ApplicationProtocolNames; @@ -133,8 +132,7 @@ public static class Builder { public Builder() {} public NettyGrpcClient build() throws SSLException { - NettyChannelBuilder channelBuilder = NettyChannelBuilder.forAddress(addr.getAddress(), addr.getPort()) - .proxyDetector(GrpcUtil.NOOP_PROXY_DETECTOR); + NettyChannelBuilder channelBuilder = NettyChannelBuilder.forAddress(addr.getAddress(), addr.getPort()).proxyDetector(null); if (clientAuth || insecure) { SslContextBuilder builder = SslContextBuilder.forClient(); From 5e22876881a43068a0eba0527867978c918b010d Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 16:06:12 -0800 Subject: [PATCH 08/11] Fix example code snippet. Thanks code rabbit Signed-off-by: Finn Carroll --- modules/transport-grpc/test-framework/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/transport-grpc/test-framework/README.md b/modules/transport-grpc/test-framework/README.md index ec86c1f8e3080..68c2463b24871 100644 --- a/modules/transport-grpc/test-framework/README.md +++ b/modules/transport-grpc/test-framework/README.md @@ -16,7 +16,7 @@ Example usage of `OpenSearchIntegTestCase` and helper functions. public class MyPluginTest extends OpenSearchIntegTestCase { public void testMyPluginFeature() { - ManagedChannel plainTextGrpcChannel = NettyChannelBuilder.forAddress("localhost", "9200"). + ManagedChannel plainTextGrpcChannel = NettyChannelBuilder.forAddress("localhost", 9200). proxyDetector(NOOP_PROXY_DETECTOR). usePlaintext() .build(); From 22e84b358d395998edd3af3c1ded375e1517c88a Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 16:07:01 -0800 Subject: [PATCH 09/11] Remove dup protos dependency. Enable javadocs check on precommit. Signed-off-by: Finn Carroll --- modules/transport-grpc/test-framework/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/transport-grpc/test-framework/build.gradle b/modules/transport-grpc/test-framework/build.gradle index 85e84168c2d96..83bdfdf62280f 100644 --- a/modules/transport-grpc/test-framework/build.gradle +++ b/modules/transport-grpc/test-framework/build.gradle @@ -22,7 +22,6 @@ dependencies { api "io.grpc:grpc-core:${versions.grpc}" api "io.grpc:grpc-netty-shaded:${versions.grpc}" api "io.grpc:grpc-protobuf-lite:${versions.grpc}" - api "io.grpc:grpc-protobuf:${versions.grpc}" api "io.grpc:grpc-services:${versions.grpc}" api "io.grpc:grpc-stub:${versions.grpc}" api "io.grpc:grpc-util:${versions.grpc}" @@ -38,6 +37,9 @@ dependencies { internalClusterTestImplementation project(':modules:transport-grpc') } +// Enable javadoc checks for precommit since this module has full coverage +precommit.dependsOn missingJavadoc + tasks.named("dependencyLicenses").configure { mapping from: /grpc-.*/, to: 'grpc' } From 4e635f52a198ed8239d170db83d7ccfc6a001280 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 16:07:35 -0800 Subject: [PATCH 10/11] Missing javadocs. Signed-off-by: Finn Carroll --- .../transport/grpc/test/GrpcOpenSearchIntegTestCase.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java index fd2dadfcb1fce..3420e8bb827c3 100644 --- a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java +++ b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java @@ -62,6 +62,10 @@ protected GrpcOpenSearchIntegTestCase() { public static class GrpcTestBulkResponse { private final BulkResponse protoBulkResponse; + /** + * Constructor for GrpcTestBulkResponse. + * @param protoBulkResponse the gRPC bulk response to wrap + */ GrpcTestBulkResponse(BulkResponse protoBulkResponse) { this.protoBulkResponse = protoBulkResponse; } @@ -119,6 +123,10 @@ public int getErrors() { public static class GrpcTestSearchResponse { private final SearchResponse protoSearchResponse; + /** + * Constructor for GrpcTestSearchResponse. + * @param protoSearchResponse the gRPC search response to wrap + */ GrpcTestSearchResponse(SearchResponse protoSearchResponse) { this.protoSearchResponse = protoSearchResponse; } From 7cacdd4aa1ab1606534632d8ba2216e9186db218 Mon Sep 17 00:00:00 2001 From: Finn Carroll Date: Wed, 7 Jan 2026 16:09:47 -0800 Subject: [PATCH 11/11] Fix innacurate javadoc. Signed-off-by: Finn Carroll --- .../transport/grpc/test/GrpcOpenSearchIntegTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java index 3420e8bb827c3..1e0e2f03797e6 100644 --- a/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java +++ b/modules/transport-grpc/test-framework/src/main/java/org/opensearch/transport/grpc/test/GrpcOpenSearchIntegTestCase.java @@ -142,7 +142,7 @@ public long getTotalCount() { /** * Gets the source of a document at the specified index. * @param i the index of the document - * @return the document source as a string, or null if index is out of bounds + * @return the document source as a string, or throw IndexOutOfBoundsException if index is out of bounds */ public String getDocumentSource(int i) { return protoSearchResponse.getHits().getHits(i).getXSource().toString();