This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-mosaic.git
The following commit(s) were added to refs/heads/main by this push:
new 8192590 test: make cross-language interop runs explicit (#95)
8192590 is described below
commit 81925903a72cf45b3783d44ed46f7fbc619be80f
Author: jianguotian <[email protected]>
AuthorDate: Tue Sep 22 17:18:36 2026 +0800
test: make cross-language interop runs explicit (#95)
---
.github/workflows/ci.yml | 6 +++---
core/tests/interop_read_test.rs | 6 ++++++
docs/verifying-a-release-candidate.html | 22 ++++++++++++++++++++++
3 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3163d4d..9bbab44 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -80,7 +80,7 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: Test with coverage
- run: cargo llvm-cov --summary-only -- --skip
test_read_java_written_file --skip test_read_python_written_file
+ run: cargo llvm-cov --summary-only
cpp-test:
runs-on: ubuntu-latest
@@ -154,7 +154,7 @@ jobs:
run: mvn test "-DargLine=-Djava.library.path=${{ github.workspace
}}/target/release"
- name: Read Java-written interop file (Rust)
- run: cargo test --release -p paimon-mosaic-core --test
interop_read_test test_read_java_written_file
+ run: cargo test --release -p paimon-mosaic-core --test
interop_read_test test_read_java_written_file -- --ignored --exact
python-test:
runs-on: ubuntu-latest
@@ -194,4 +194,4 @@ jobs:
MOSAIC_LIB_PATH: ${{ github.workspace }}/target/release
- name: Read Python-written interop file (Rust)
- run: cargo test --release -p paimon-mosaic-core --test
interop_read_test test_read_python_written_file
+ run: cargo test --release -p paimon-mosaic-core --test
interop_read_test test_read_python_written_file -- --ignored --exact
diff --git a/core/tests/interop_read_test.rs b/core/tests/interop_read_test.rs
index 83fc492..1f3c8b4 100644
--- a/core/tests/interop_read_test.rs
+++ b/core/tests/interop_read_test.rs
@@ -17,6 +17,10 @@
//! Interop read tests: reads .mosaic files written by Java and Python,
//! verifying that Rust can correctly read files produced by other languages.
+//!
+//! These tests are ignored in Rust-only test runs because Cargo cannot produce
+//! their cross-language fixtures. CI and the release verification guide run
+//! them explicitly after the corresponding Java or Python producer.
#![allow(
clippy::approx_constant,
@@ -70,6 +74,7 @@ fn open_file(filename: &str) ->
MosaicReader<ByteArrayInputFile> {
// ======================== 1. Read java_written.mosaic
========================
#[test]
+#[ignore = "requires java_written.mosaic from the explicit Java interop
workflow"]
fn test_read_java_written_file() {
let reader = open_file("java_written.mosaic");
let num_rgs = reader.num_row_groups();
@@ -147,6 +152,7 @@ fn test_read_java_written_file() {
// ======================== 2. Read python_written.mosaic
========================
#[test]
+#[ignore = "requires python_written.mosaic from the explicit Python interop
workflow"]
fn test_read_python_written_file() {
let reader = open_file("python_written.mosaic");
let num_rgs = reader.num_row_groups();
diff --git a/docs/verifying-a-release-candidate.html
b/docs/verifying-a-release-candidate.html
index 7bad56a..fb1d44f 100644
--- a/docs/verifying-a-release-candidate.html
+++ b/docs/verifying-a-release-candidate.html
@@ -99,6 +99,28 @@ cd paimon-mosaic-${RELEASE_VERSION}</code></pre>
<p>Build and test all workspace crates:</p>
<pre><code>cargo build --workspace --release
cargo test --workspace</code></pre>
+ <p>The workspace test reports the two Rust consumers of
Java/Python fixtures as <code>ignored</code>. This is an explicit indication
that cross-language interoperability was not tested by the Rust-only
command.</p>
+
+ <h3>Cross-language interoperability</h3>
+ <p>Run the following sequences from the source tree root. Each
sequence clears the shared fixture directory first, so stale files cannot make
the verification pass. The final Rust command explicitly runs the ignored
fixture consumer and fails if the expected Java or Python fixture is
missing.</p>
+ <p><strong>Rust and Java:</strong></p>
+<pre><code>rm -rf /tmp/mosaic_interop
+ROOT_DIR="$(pwd)"
+cargo build --release -p paimon-mosaic-jni
+cargo test --release -p paimon-mosaic-core --test interop_write_test
+(cd java && mvn test
"-DargLine=-Djava.library.path=${ROOT_DIR}/target/release")
+cargo test --release -p paimon-mosaic-core --test interop_read_test \
+ test_read_java_written_file -- --ignored --exact</code></pre>
+ <p><strong>Rust and Python:</strong></p>
+<pre><code>rm -rf /tmp/mosaic_interop
+ROOT_DIR="$(pwd)"
+cargo build --release -p paimon-mosaic-ffi
+cargo test --release -p paimon-mosaic-core --test interop_write_test
+(cd python && python -m pip install pyarrow pytest && \
+ MOSAIC_LIB_PATH="${ROOT_DIR}/target/release" \
+ python -m pytest -v tests/test_interop.py)
+cargo test --release -p paimon-mosaic-core --test interop_read_test \
+ test_read_python_written_file -- --ignored --exact</code></pre>
<h3>Java</h3>
<p>Build the Java binding (requires JDK 8+ and Maven):</p>