CNDB-11460 another fix for cqlsh unicode tests in TestCqlshUnicode #1618
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



CNDB-11460 another fix for cqlsh unicode tests in TestCqlshUnicode - make a second read in read_until to get UTF-8 characters that are split across reads.
What is the issue
The original fix for CNDB-11460 added the ability for the
read_ttymethod to decode UTF-8 characters that get split across reads, by saving a partial buffer when aUnicodeDecodeErrorhappens, and use the partial buffer with the next read. When this happens,read_ttywill return''to theread_untilmethod. The first fix lacked havingread_untilinitiate a second read toread_ttyand still failed with anEOFError.What does this PR fix and why was it fixed
In this PR, the
read_untilmethod will make a second call toread_tty(viaself.read), allowingread_ttyto read anotherblksizebuffer of characters and the chance to decode UTF-8 characters that were split across reads.To better validate the fix, the test was run locally with a forced
blksize = 1to consistently generate failures and validate that the second read resolves the issue.Correct me if this is wrong, but afaict our CC CI doesn't have multiplexing capability for cqhsh tests, having separate build parameters in
ds-cassandra-buildfrom JVM tests usingDSJVMTestRepetitionsor DTests usingDSDTestRepetitions.