Surya Hebbar has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/20538 )
Change subject: IMPALA-12415: Implement tests for graphical query timeline in webUI ...................................................................... IMPALA-12415: Implement tests for graphical query timeline in webUI To help with testing the query timeline web page, the tests have been integrated using JEST testing framework based on nodejs. 'run_js_tests.sh' runs JEST test suits, after it fetches nodejs binaries and related nodejs packages, if they are not present locally. NodeJS binaries are stored within the IMPALA_TOOLCHAIN directory. 'jest-environment-jsdom' supports rendering DOM elements and testing them without the requirement of a browser. For implementing unit and integration tests, the script has been divided into multiple properly functioning modules, that are imported as ES6 modules. Unit tests have been written for the following functions that accumulate values by parsing the profile. - mapTimeseriesCounters() - Test whether the method correctly searches and maps the profile's counter's indexes based on counter_name even in reverse order - accumulateTimeseriesValues() - Test whether the method correctly accumlates values after parsing values from 'data' in 'time_series_counters' while updating 'max_samples' - generateTimesamples() - Test whether time sample values generated based on 'max_samples' are correct, with different 'max_samples' - clearTimeseriesValues() - Test whether Timeseries arrays are being properly truncated in the correct range - initializeUtilizationMetrics() - Test whether aggregate arrays and time sample arrays are correctly allocated based on counters and 'max_samples' - getSvg*() - Test whether all getSvg methods are correctly setting attributes and returning expected attributes in elements Unit tests produce JUnitXML for integration with jenkins jobs, these are stored in IMPALA_JS_TEST_LOGS_DIR. Change-Id: I0caf0a0beee23821f78c0b3fe1aeb7dbf92d6a3e --- M bin/impala-config.sh M bin/run-all-tests.sh A tests/run-js-tests.sh M www/scripts/query_timeline/chart_commons.js M www/scripts/query_timeline/fragment_diagram.js A www/scripts/query_timeline/global_dom.js M www/scripts/query_timeline/host_utilization_diagram.js A www/scripts/tests/.gitignore A www/scripts/tests/package.json A www/scripts/tests/query_timeline/chart_commons.test.js A www/scripts/tests/query_timeline/fragment_diagram.test.js A www/scripts/tests/query_timeline/host_utilization_diagram.test.js 12 files changed, 691 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/38/20538/4 -- To view, visit http://gerrit.cloudera.org:8080/20538 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0caf0a0beee23821f78c0b3fe1aeb7dbf92d6a3e Gerrit-Change-Number: 20538 Gerrit-PatchSet: 4 Gerrit-Owner: Surya Hebbar <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Surya Hebbar <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
