Skip to content

Conversation

@bhavish00007
Copy link

Reason for this PR

Fixes #757

Currently, the test data path for Spark testing is read solely from the GAR_TEST_DATA environment variable. This creates friction for new contributors or developers running tests locally without a custom setup.

This PR proposes a fallback to automatically detect common default locations (testing/, ../testing/, ../../testing/) in case the environment variable or system property is not set.


What changes are included in this PR?

  • Enhanced the checkTestData() method to:
    • First check GAR_TEST_DATA environment variable
    • Then check Java system property gar.test.data
    • Finally fallback to check common local paths for test data directories (like testing/, etc.)
  • Ensures ldbc_sample/csv/ldbc_sample.graph.yml exists before accepting the path

Are these changes tested?

These changes reuse the existing validation logic already in place within checkTestData(). The fallback will only apply if GAR_TEST_DATA is not set, so no changes are required in the test suite itself.

Manually tested by running without the environment variable and verifying that the fallback path works correctly.


Are there any user-facing changes?

No. This only impacts the developer testing experience. No changes to APIs or public behavior.

@yangxk1
Copy link
Contributor

yangxk1 commented Sep 22, 2025

Hi @bhavish00007 , please note that this PR is not ready yet

@bhavish00007
Copy link
Author

@yangxk1 can u give me update when its ready

@yangxk1
Copy link
Contributor

yangxk1 commented Sep 22, 2025

@bhavish00007, the check ci were failed, please format code (run mvn spotless:apply)

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.00%. Comparing base (1bb0468) to head (76f0bb8).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #758      +/-   ##
============================================
+ Coverage     77.77%   82.00%   +4.22%     
- Complexity      234      299      +65     
============================================
  Files            25       25              
  Lines           918     1000      +82     
  Branches         49       84      +35     
============================================
+ Hits            714      820     +106     
+ Misses          167      125      -42     
- Partials         37       55      +18     
Flag Coverage Δ
java-info 82.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yangxk1
Copy link
Contributor

yangxk1 commented Sep 28, 2025

Hey @bhavish00007 , I formatted the code and pass the test, It looks good. Do you have anything else to add?

@yangxk1
Copy link
Contributor

yangxk1 commented Oct 14, 2025

Does this PR resolve the issue? @Thespica

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[maven-project] get test data by default path, rather than env variable

3 participants