Riza Suminto has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/21064


Change subject: IMPALA-12840: Deflake test_reuse_partitions_transactional
......................................................................

IMPALA-12840: Deflake test_reuse_partitions_transactional

TestReusePartitions::test_reuse_partitions_transactional calls
/catalog_object path of CatalogD's WebUI and decodes the JSON response.
The "json_string" field from the response text often contains unicode
control character that will throw error such as following upon decoding:

ValueError: Invalid control character at: line 1 column 1850 (char 1849)

This control character exist after the legal JSON string. This patch
attempt to deflake the test by passing strict=False argument to
json.loads() function.
https://docs.python.org/2/library/json.html#encoders-and-decoders

This patch also print the response / JSON object if assertion fail.

Testing:
- Loop and pass the test for hundred times.
- Manually hack the test to proof that "json_string" is successfully
  parsed even when unicode control character exist.

Change-Id: I5f6840bf1267d1d99d321c0a6b4a0cab49543182
---
M tests/metadata/test_reuse_partitions.py
1 file changed, 7 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/64/21064/1
--
To view, visit http://gerrit.cloudera.org:8080/21064
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f6840bf1267d1d99d321c0a6b4a0cab49543182
Gerrit-Change-Number: 21064
Gerrit-PatchSet: 1
Gerrit-Owner: Riza Suminto <[email protected]>

Reply via email to