Skip to content

Commit cb9d6ab

Browse files
authored
Merge pull request #535 from apache/serialization-test-data-dir
Move Java test fixtures to serialization_test_data/java_generated_files
2 parents 16d4ea6 + 185e074 commit cb9d6ab

15 files changed

Lines changed: 35 additions & 30 deletions

‎.github/workflows/serde_compat.yml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@ jobs:
1717
uses: actions/checkout@v5
1818
with:
1919
repository: apache/datasketches-java
20-
path: java
20+
path: datasketches-java
2121
- name: Setup Java
2222
uses: actions/setup-java@v5
2323
with:
2424
java-version: '25'
2525
distribution: 'temurin'
2626
- name: Run Java
27-
run: cd java && mvn test -P generate-java-files
27+
run: cd datasketches-java && mvn test -P generate-java-files
2828
- name: Copy files
29-
run: cp java/serialization_test_data/java_generated_files/*.sk java
29+
run: |
30+
mkdir -p serialization_test_data/java_generated_files
31+
cp datasketches-java/serialization_test_data/java_generated_files/*.sk serialization_test_data/java_generated_files
3032
- name: Run cmake
3133
run: cd build && cmake .. -DSERDE_COMPAT=true
3234
- name: Build C++ unit tests

‎.gitignore‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,7 @@ _*/
4242
!__init__.py
4343

4444
docs
45-
java
45+
# Cross-language test data: sketch snapshots and the datasketches-java checkout used to generate them
46+
serialization_test_data/
47+
datasketches-java/
48+
*.sk

‎cpc/test/cpc_sketch_deserialize_from_java_test.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
namespace datasketches {
2525

2626
// assume the binary sketches for this test have been generated by datasketches-java code
27-
// in the subdirectory called "java" in the root directory of this project
28-
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
27+
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
28+
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";
2929

3030
TEST_CASE("cpc sketch", "[serde_compat]") {
3131
const unsigned n_arr[] = {0, 100, 200, 2000, 20000};

‎fi/test/frequent_items_sketch_deserialize_from_java_test.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
namespace datasketches {
2525

2626
// assume the binary sketches for this test have been generated by datasketches-java code
27-
// in the subdirectory called "java" in the root directory of this project
28-
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
27+
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
28+
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";
2929

3030
TEST_CASE("frequent longs", "[serde_compat]") {
3131
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};

‎filters/test/bloom_filter_deserialize_from_java_test.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
namespace datasketches {
2626

2727
// assume the binary sketches for this test have been generated by datasketches-java code
28-
// in the subdirectory called "java" in the root directory of this project
29-
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
28+
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
29+
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";
3030

3131
TEST_CASE("bloom_filter", "[serde_compat]") {
3232
const uint64_t n_arr[] = {0, 10000, 2000000, 30000000};

‎hll/test/hll_sketch_deserialize_from_java_test.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
namespace datasketches {
2525

2626
// assume the binary sketches for this test have been generated by datasketches-java code
27-
// in the subdirectory called "java" in the root directory of this project
28-
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
27+
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
28+
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";
2929

3030
TEST_CASE("hll4 sketch", "[serde_compat]") {
3131
const unsigned n_arr[] = {0, 10, 100, 1000, 10000, 100000, 1000000};

‎kll/test/kll_sketch_deserialize_from_java_test.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
namespace datasketches {
2525

2626
// assume the binary sketches for this test have been generated by datasketches-java code
27-
// in the subdirectory called "java" in the root directory of this project
28-
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
27+
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
28+
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";
2929

3030
TEST_CASE("kll float", "[serde_compat]") {
3131
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};

‎quantiles/test/quantiles_sketch_deserialize_from_java_test.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
namespace datasketches {
2525

2626
// assume the binary sketches for this test have been generated by datasketches-java code
27-
// in the subdirectory called "java" in the root directory of this project
28-
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
27+
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
28+
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";
2929

3030
TEST_CASE("quantiles double", "[serde_compat]") {
3131
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};

‎req/test/req_sketch_deserialize_from_java_test.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
namespace datasketches {
2525

2626
// assume the binary sketches for this test have been generated by datasketches-java code
27-
// in the subdirectory called "java" in the root directory of this project
28-
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
27+
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
28+
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";
2929

3030
TEST_CASE("req float", "[serde_compat]") {
3131
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};

‎sampling/test/var_opt_sketch_deserialize_from_java_test.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
namespace datasketches {
2525

2626
// assume the binary sketches for this test have been generated by datasketches-java code
27-
// in the subdirectory called "java" in the root directory of this project
28-
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
27+
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
28+
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";
2929

3030
TEST_CASE("var opt sketch long", "[serde_compat]") {
3131
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};

0 commit comments

Comments
 (0)