Todd Lipcon has submitted this change and it was merged. Change subject: KUDU-2119. Fix failure in encoding-test ......................................................................
KUDU-2119. Fix failure in encoding-test In commit d1f53cc32 I introduced randomization for the format string used for the generated string data in this test. The random format string could sometimes incorporate '\0' bytes, which, in the worst case, could result in a string of length 0 or 1. This would then cause a later assertion to fail that was checking that the encoded data be at least two bytes per string. The fix switches from using a printf-style string to instead use a std::function to generate the data. The implementation of the function avoids using C strings and thus permits embedded null bytes. Change-Id: Ic46d2a993235e560475d931c7b023eb5b4faf7c2 Reviewed-on: http://gerrit.cloudera.org:8080/7967 Tested-by: Kudu Jenkins Reviewed-by: Hao Hao <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> Reviewed-by: Andrew Wong <[email protected]> Reviewed-by: Adar Dembo <[email protected]> --- M src/kudu/cfile/encoding-test.cc M src/kudu/util/random_util.cc M src/kudu/util/random_util.h 3 files changed, 49 insertions(+), 38 deletions(-) Approvals: Hao Hao: Looks good to me, but someone else must approve Andrew Wong: Looks good to me, but someone else must approve Adar Dembo: Looks good to me, approved Alexey Serbin: Looks good to me, but someone else must approve Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/7967 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic46d2a993235e560475d931c7b023eb5b4faf7c2 Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Reviewer: Will Berkeley <[email protected]>
