You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/04/02 16:27:40 UTC

[GitHub] [cassandra-dtest] stef1927 commented on a change in pull request #61: CASSANDRA-15679 Test COPY on collections with blobs

stef1927 commented on a change in pull request #61: CASSANDRA-15679 Test COPY on collections with blobs
URL: https://github.com/apache/cassandra-dtest/pull/61#discussion_r402445998
 
 

 ##########
 File path: cqlsh_tests/test_cqlsh_copy.py
 ##########
 @@ -1788,9 +1794,15 @@ def test_all_datatypes_read(self):
             writer = csv.writer(csvfile)
             # serializing blob bytearray in friendly format
             data_set = list(self.data)
-            data_set[2] = '0x{}'.format(''.join('%02x' % c for c in self.data[2]))
+            data_set[2] = _format_blob(self.data[2])
+            data_set[25][3] =  _format_blob(self.data[25][3])
+            data_set[26] = [_format_blob(el) for el in self.data[26]]
+            data_set[27] = {_format_blob(el) for el in self.data[27]}
             writer.writerow(data_set)
 
+        def _format_blob(blob):
+            return '0x{}'.format(''.join('%02x' % c for c in self.data[2]))
+
 
 Review comment:
   I'm getting an error at line 1797 unless I move `format_blob` before it gets used. Also, `self.data[2]` should be `blob`? Once I fixed this, there was a problem with the indexes for `data_set`. Is this what you meant: https://github.com/stef1927/cassandra-dtest-1/commit/966e6db437cd0a6ecd731ffe9a6279a275065341?
   
   If that commit is correct, I still see problems in copyutil unfortunately.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org