This is an automated email from the ASF dual-hosted git repository. adelapena pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
The following commit(s) were added to refs/heads/trunk by this push: new 36649072 Fix time function upgrade tests involving 2.1 36649072 is described below commit 36649072de261b318ab07272608c8339369d0ad1 Author: Andrés de la Peña <a.penya.gar...@gmail.com> AuthorDate: Sun Mar 26 20:40:40 2023 +0200 Fix time function upgrade tests involving 2.1 patch by Andrés de la Peña; reviewed by Berenguer Blasi and Michael Semb Wever for CASSANDRA-18328 --- upgrade_tests/cql_tests.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/upgrade_tests/cql_tests.py b/upgrade_tests/cql_tests.py index 8d3666c3..3147c7b5 100644 --- a/upgrade_tests/cql_tests.py +++ b/upgrade_tests/cql_tests.py @@ -2654,7 +2654,8 @@ class TestCQL(UpgradeTester): assert_invalid(cursor, "SELECT minTimeuuid(k) FROM test WHERE k = 0 AND t = %s" % dates[0]) - cursor.execute("SELECT toTimestamp(t), toUnixTimestamp(t) FROM test WHERE k = 0 AND t = %s" % dates[0]) + if self.get_node_version(is_upgraded) >= LooseVersion('2.2'): + cursor.execute("SELECT toTimestamp(t), toUnixTimestamp(t) FROM test WHERE k = 0 AND t = %s" % dates[0]) if self.get_node_version(is_upgraded) < LooseVersion('5.0'): cursor.execute("SELECT dateOf(t), unixTimestampOf(t) FROM test WHERE k = 0 AND t = %s" % dates[0]) @@ -3033,7 +3034,8 @@ class TestCQL(UpgradeTester): for i in range(0, 5): cursor.execute("INSERT INTO test (k, t) VALUES (%d, now())" % i) - cursor.execute("SELECT totimestamp(t) FROM test") + if self.get_node_version(is_upgraded) >= LooseVersion('2.2'): + cursor.execute("SELECT totimestamp(t) FROM test") if self.get_node_version(is_upgraded) < LooseVersion('5.0'): cursor.execute("SELECT dateOf(t) FROM test") @@ -3431,7 +3433,9 @@ class TestCQL(UpgradeTester): cursor.execute("TRUNCATE test") cursor.execute("INSERT INTO test(k) VALUES (0)") - assert_one(cursor, "SELECT toTimestamp(t) FROM test WHERE k=0", [None]) + + if self.get_node_version(is_upgraded) >= LooseVersion('2.2'): + assert_one(cursor, "SELECT toTimestamp(t) FROM test WHERE k=0", [None]) if self.get_node_version(is_upgraded) < LooseVersion('5.0'): assert_one(cursor, "SELECT dateOf(t) FROM test WHERE k=0", [None]) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org