Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rhou1
Copy link
Contributor

@rhou1 rhou1 commented Jan 4, 2018

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.

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.
@rhou1
Copy link
Contributor Author

rhou1 commented Jan 4, 2018

Chun, please take a look.

@agirish
Copy link
Member

agirish commented Jan 4, 2018

Hey this is really cool! Thanks for adding this

@agirish
Copy link
Member

agirish commented Jan 4, 2018

Does this handle cases when there are more than one test def JSON files in the folder?

@rhou1
Copy link
Contributor Author

rhou1 commented Jan 4, 2018

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.

@agirish
Copy link
Member

agirish commented Jan 4, 2018

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()) {
Copy link
Contributor

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?

}
}
}

Copy link
Contributor

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:

  1. -s .../dir contains test definition file and sudirs containing .json
  2. -s .../test_definition_file.json
  3. -s .../test_query.q
  4. -s .../dir without any test definition files in any of the dir and parent dirs

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the "..." do?

  1. how is .json different from test definition file?
  2. are there any files besides test_definition_file.json in the directory?

Copy link
Contributor Author

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

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.

3 participants