-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance Test Framework to be able to run a single test. #391
base: master
Are you sure you want to change the base?
Conversation
The -s option can now support a mixture of test suites and individual query files, separated by commas. If the individual query file does not have a json definition file in the same directory, the Test Framework will check the parent directories until it finds at least one JSON file, at which time it assumes that one of those JSON files can be used.
Chun, please take a look. |
Hey this is really cool! Thanks for adding this |
Does this handle cases when there are more than one test def JSON files in the folder? |
Yes, this supports having multiple JSON definition files in the same folder. This is how I discovered the query file extension is not quite correct, because I was picking the wrong JSON file. |
cool, thanks! I'd like to try this out sometime. |
List<File> jsonFiles = searchFiles(singleTestFile.getParentFile(), ".*.json"); | ||
if (jsonFiles.isEmpty()) { | ||
String updir = ""; | ||
while (jsonFiles.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you never encounter a test definition file in any of the upstream directories?
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you test the following scenarios:
- -s .../dir contains test definition file and sudirs containing .json
- -s .../test_definition_file.json
- -s .../test_query.q
- -s .../dir without any test definition files in any of the dir and parent dirs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to specify the relative path to the test, including the file extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the "..." do?
- how is .json different from test definition file?
- are there any files besides test_definition_file.json in the directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agirish. Yes. Previously we would say
-s Functional/p1tests
Now we can say
-s Functional/p1tests/is_null.q
The -s option can now support a mixture of test suites and individual query files,
separated by commas. If the individual query file does not have a json definition
file in the same directory, the Test Framework will check the parent directories
until it finds at least one JSON file, at which time it assumes that one of those
JSON files can be used.