Improve unit test coverage for MSQ#13398
Conversation
adarshsanjeev
left a comment
There was a problem hiding this comment.
Thanks for the PR!
Tests added look good to me. Should there also be tests for TooManyInputFilesFault etc here?
adarshsanjeev
left a comment
There was a problem hiding this comment.
New test case looks good as well. Thanks for making the changes!
|
@LakshSingla , it seems a real overkill to have 30k rows of data just to get a specific exception in a unit test. |
|
@kfaraz MAX_PARTITIONS (25k) is a constant defined above which the query would fail. To get this many partitions, in my understanding we would require at least 25000 rows. I can think of the following options to prevent this static file here:
|
|
Yes, @LakshSingla , the first option seems most reasonable. You shouldn't have to generate the file either. You could maybe add a utility method in |
| * Helper method that populates a temporary file with {@code numRows} rows and {@code numColumns} columns where the | ||
| * first column is a string 'timestamp' while the rest are string columns with junk value | ||
| */ | ||
| protected File generateTemporaryNdJsonFile(final int numRows, final int numColumns) throws IOException |
There was a problem hiding this comment.
I think we can add a new class for this and the previous method. MSQTestFileUtils?
Description
This PR adds a new set of tests called
MSQFaultsTestthat aims to improve the testing coverage for MSQ by adding new unit tests for when the query should fault.This PR has: