fix: fallback to default test data path if GAR_TEST_DATA not set #758
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reason for this PR
Fixes #757
Currently, the test data path for Spark testing is read solely from the
GAR_TEST_DATAenvironment 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?
checkTestData()method to:GAR_TEST_DATAenvironment variablegar.test.datatesting/, etc.)ldbc_sample/csv/ldbc_sample.graph.ymlexists before accepting the pathAre these changes tested?
These changes reuse the existing validation logic already in place within
checkTestData(). The fallback will only apply ifGAR_TEST_DATAis 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.