Hello Riza Suminto, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/20272
to look at the new patch set (#2).
Change subject: IMPALA-12311: Remove extra newlines in the updated golden file
......................................................................
IMPALA-12311: Remove extra newlines in the updated golden file
This patch removes extra newlines added to subsections when we parse
test queries in an end-to-end test file. Specifically, in
parse_test_file_text(), we append an extra newline in every subsection
of a test query, resulting in one extra newline in the updated golden
file if we add '--update_results' when running this test file to produce
the updated golden file. This could be seen by looking at the updated
golding file under $IMPALA_HOME/logs/ee_tests after executing the
following.
$IMPALA_HOME/bin/impala-py.test \
--update_results \
$IMPALA_HOME/tests/query_test/test_tpcds_queries.py::TestTpcdsDecimalV2Query::test_tpcds_q1
The extra newline is needed for the verification of the subsections of
RESULTS, DML_RESULTS, ERRORS to disambiguate the case of no lines from
a single line with no text and will not be needed after the
verification.
To remove such extra newlines, we choose to do it in the place when
write_test_file() is called to output the updated golden file since this
requires fewer changes. An alternative could be to only add an extra
newline for those 3 subsections mentioned above and also remove the last
newline added in join_section_lines(), which would be called when the
actual contents do not match the expected contents specified in the
original golden file in the subsections of ERRORS, TYPES, LABELS,
RESULTS and DML_RESULTS. Additional changes to TestTestFileParser are
also required if we adopted the alternative.
Testing:
- Verified that the extra newlines are removed after this patch.
Change-Id: Ic7668a437267bd76afecba8f87ead32d82580414
---
M tests/util/test_file_parser.py
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/72/20272/2
--
To view, visit http://gerrit.cloudera.org:8080/20272
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic7668a437267bd76afecba8f87ead32d82580414
Gerrit-Change-Number: 20272
Gerrit-PatchSet: 2
Gerrit-Owner: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>