test_limit_multiget | Failure | TypeError: '<' not supported between instances of 'str' and 'int'
self = <abc.TestCQLNodes2RF1_Upgrade_current_5_0_x_To_indev_5_0_x object at 0x7f4679b9eb80>
def test_limit_multiget(self):
""" Validate LIMIT option for 'multiget' in SELECT statements """
cursor = self.prepare()
cursor.execute("""
CREATE TABLE clicks (
userid int,
url text,
time bigint,
PRIMARY KEY (userid, url)
) WITH COMPACT STORAGE;
""")
for is_upgraded, cursor in self.do_upgrade(cursor):
logger.debug("Querying {} node".format("upgraded" if is_upgraded else "old"))
cursor.execute("TRUNCATE clicks")
# Inserts
for id in range(0, 100):
for tld in ['com', 'org', 'net']:
cursor.execute("INSERT INTO clicks (userid, url, time) VALUES ({}, 'http://foo.{}', 42)".format(id, tld))
# Check that we do limit the output to 1 *and* that we respect query
# order of keys (even though 48 is after 2) prior to 2.1.17
> if self.get_node_version(is_upgraded) >= '2.1.17':
upgrade_tests/cql_tests.py:359:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
upgrade_tests/upgrade_base.py:227: in get_node_version
return max(node_versions) if is_upgraded else min(node_versions)
/usr/lib/python3.8/distutils/version.py:64: in __gt__
c = self._cmp(other)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = LooseVersion ('5.0-rc1'), other = LooseVersion ('5.0.1')
def _cmp (self, other):
if isinstance(other, str):
other = LooseVersion(other)
if self.version == other.version:
return 0
> if self.version < other.version:
E TypeError: '<' not supported between instances of 'str' and 'int'
/usr/lib/python3.8/distutils/version.py:337: TypeError | 52.384 |