This is an automated email from the ASF dual-hosted git repository.
sunchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 1fbe618 Improve integration testing docs (#1403)
1fbe618 is described below
commit 1fbe618eb2240d8a8dbd0c03baa8d726d7a45472
Author: Andrew Lamb <[email protected]>
AuthorDate: Sun Mar 6 13:41:11 2022 -0500
Improve integration testing docs (#1403)
---
arrow-flight/Cargo.toml | 4 --
arrow-pyarrow-integration-testing/README.md | 2 +-
integration-testing/README.md | 76 ++++++++++++++++++++--
.../src/bin/flight-test-integration-client.rs | 2 +-
4 files changed, 72 insertions(+), 12 deletions(-)
diff --git a/arrow-flight/Cargo.toml b/arrow-flight/Cargo.toml
index 5ae270e..edb4090 100644
--- a/arrow-flight/Cargo.toml
+++ b/arrow-flight/Cargo.toml
@@ -43,7 +43,3 @@ tonic-build = "0.6"
# Pin specific version of the tonic-build dependencies to avoid auto-generated
# (and checked in) arrow.flight.protocol.rs from changing
proc-macro2 = ">1.0.30"
-
-#[lib]
-#name = "flight"
-#path = "src/lib.rs"
diff --git a/arrow-pyarrow-integration-testing/README.md
b/arrow-pyarrow-integration-testing/README.md
index 7e78aa9..fecf33e 100644
--- a/arrow-pyarrow-integration-testing/README.md
+++ b/arrow-pyarrow-integration-testing/README.md
@@ -17,7 +17,7 @@
under the License.
-->
-# Arrow c integration
+# Arrow + PyArrow integration testing
This is a Rust crate that tests compatibility between Rust's Arrow
implementation and PyArrow.
diff --git a/integration-testing/README.md b/integration-testing/README.md
index ff36542..81160a0 100644
--- a/integration-testing/README.md
+++ b/integration-testing/README.md
@@ -19,12 +19,76 @@
# Apache Arrow Rust Integration Testing
-See [Integration.rst](../../docs/source/format/Integration.rst) for an
overview of integration testing.
+See [Integration
Testing](https://arrow.apache.org/docs/format/Integration.html) for an overview
of integration testing.
This crate contains the following binaries, which are invoked by Archery
during integration testing with other Arrow implementations.
-| Binary | Purpose |
-| --------------------------- | ----------------------------------------- |
-| arrow-file-to-stream | Converts an Arrow file to an Arrow stream |
-| arrow-stream-to-file | Converts an Arrow stream to an Arrow file |
-| arrow-json-integration-test | Converts between Arrow and JSON formats |
+| Binary | Purpose |
+| ------------------------------ | ----------------------------------------- |
+| arrow-file-to-stream | Converts an Arrow file to an Arrow stream |
+| arrow-stream-to-file | Converts an Arrow stream to an Arrow file |
+| arrow-json-integration-test | Converts between Arrow and JSON formats |
+| flight-test-integration-server | Flight integration test: Server |
+| flight-test-integration-client | Flight integration test: Client |
+
+# Notes on how to run Rust Integration Test against C/C++
+
+The code for running the integration tests is in the
[arrow](https://github.com/apache/arrow) repository
+
+### Check out code:
+
+```shell
+# check out arrow
+git clone [email protected]:apache/arrow.git
+# link rust source code into arrow
+ln -s <path_to_arrow_rs> arrow/rust
+```
+
+### Install the tools:
+
+```shell
+cd arrow
+pip install -e dev/archery[docker]
+```
+
+### Build the C++ binaries:
+
+Follow the [C++
Direction](https://github.com/apache/arrow/tree/master/docs/source/developers/cpp)
and build the integration test binaries with a command like this:
+
+```
+# build cpp binaries
+cd arrow/cpp
+mkdir build
+cd build
+cmake -DARROW_BUILD_INTEGRATION=ON -DARROW_FLIGHT=ON --preset
ninja-debug-minimal ..
+cd ..
+ninja
+```
+
+### Build the Rust binaries
+
+Then
+
+```
+# build rust:
+cd ../arrow-rs
+cargo build --all
+```
+
+### Run archery
+
+You can run the Archery tool using a command such as the following:
+
+```shell
+archery integration --with-cpp=true --with-rust=true
+```
+
+To debug an individual test scenario, it is also possible to run the binaries
directly:
+
+```shell
+# Run cpp server
+$ arrow/cpp/build/debug/flight-test-integration-server -port 49153
+
+# run rust client (you can see file names if you run archery --debug
+$ arrow/rust/target/debug/flight-test-integration-client --host localhost
--port=49153 --path /tmp/generated_dictionary_unsigned.json
+```
diff --git a/integration-testing/src/bin/flight-test-integration-client.rs
b/integration-testing/src/bin/flight-test-integration-client.rs
index f380627..fa99b42 100644
--- a/integration-testing/src/bin/flight-test-integration-client.rs
+++ b/integration-testing/src/bin/flight-test-integration-client.rs
@@ -37,7 +37,7 @@ struct Args {
#[clap(
short,
long,
- help = "path to the descriptor file, only used when scenario is not
provided"
+ help = "path to the descriptor file, only used when scenario is not
provided. See
https://arrow.apache.org/docs/format/Integration.html#json-test-data-format"
)]
path: Option<String>,
#[clap(long, arg_enum)]