bhavish00007 opened a new pull request, #758: URL: https://github.com/apache/incubator-graphar/pull/758
<!-- Thanks for contributing to GraphAr. If this is your first pull request you can find detailed information on [CONTRIBUTING.md](https://github.com/apache/graphar/blob/main/CONTRIBUTING.md) The Apache GraphAr (incubating) community has restrictions on the naming of pr title. You can find instructions in [CONTRIBUTING.md](https://github.com/apache/graphar/blob/main/CONTRIBUTING.md#title) too. --> ### Reason for this PR Fixes [#757](https://github.com/apache/graphar/issues/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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
