This is an automated email from the ASF dual-hosted git repository.
vinaychella pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/master by this push:
new 35b22f5 Fix TypeError for str and bytes concatenation in
test_upgrade_with_range_tombstone_eoc_0 and thrift_test.py::composite
35b22f5 is described below
commit 35b22f57a03ce9e14865e335b4eb30fc11645a5c
Author: Vinay Chella <[email protected]>
AuthorDate: Wed Feb 13 12:54:06 2019 -0800
Fix TypeError for str and bytes concatenation in
test_upgrade_with_range_tombstone_eoc_0 and thrift_test.py::composite
Patch by Vinay Chella; reviewed by Ariel Weisberg for CASSANDRA-15021
---
thrift_test.py | 2 ++
upgrade_tests/storage_engine_upgrade_test.py | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/thrift_test.py b/thrift_test.py
index 1cf06ea..668b6cf 100644
--- a/thrift_test.py
+++ b/thrift_test.py
@@ -149,6 +149,8 @@ def composite(item1, item2=None, eoc=b'\x00'):
item1 = utf8encode(item1)
if isinstance(item2, str):
item2 = utf8encode(item2)
+ if isinstance(eoc, str):
+ eoc = utf8encode(eoc)
packed = _i16(len(item1)) + item1 + eoc
if item2 is not None:
diff --git a/upgrade_tests/storage_engine_upgrade_test.py
b/upgrade_tests/storage_engine_upgrade_test.py
index 88abb97..a63ef85 100644
--- a/upgrade_tests/storage_engine_upgrade_test.py
+++ b/upgrade_tests/storage_engine_upgrade_test.py
@@ -431,8 +431,8 @@ class TestStorageEngineUpgrade(Tester):
i32(1): {
'rt': [Mutation(deletion=Deletion(2470761440040513,
predicate=SlicePredicate(slice_range=SliceRange(
- start=composite('a',
eoc='\x00'),
- finish=composite('asd',
eoc='\x00')))))]
+ start=composite('a',
eoc=b'\x00'),
+ finish=composite('asd',
eoc=b'\x00')))))]
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]