This is an automated email from the ASF dual-hosted git repository.

brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 5d968e6  computeMaxTTL directly before fetching TTL in TTLTest
5d968e6 is described below

commit 5d968e6d274f9743a777276d5b5ee09fa4db3254
Author: Brandon Williams <[email protected]>
AuthorDate: Tue Jul 28 15:52:13 2020 -0500

    computeMaxTTL directly before fetching TTL in TTLTest
    
    patch by brandonwilliams, reviewed by dcapwell for CASSANDRA-15959
---
 .../unit/org/apache/cassandra/cql3/validation/operations/TTLTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/test/unit/org/apache/cassandra/cql3/validation/operations/TTLTest.java 
b/test/unit/org/apache/cassandra/cql3/validation/operations/TTLTest.java
index 99ca7dc..187818a 100644
--- a/test/unit/org/apache/cassandra/cql3/validation/operations/TTLTest.java
+++ b/test/unit/org/apache/cassandra/cql3/validation/operations/TTLTest.java
@@ -313,12 +313,12 @@ public class TTLTest extends CQLTester
         // TTL is computed dynamically from row expiration time, so if it is
         // equal or higher to the minimum max TTL we compute before the query
         // we are fine.
-        int minMaxTTL = computeMaxTTL();
         UntypedResultSet execute = execute("SELECT ttl(" + field + ") FROM %s 
WHERE k = 1");
+        int minMaxTTL = computeMaxTTL();
         for (UntypedResultSet.Row row : execute)
         {
             int ttl = row.getInt("ttl(" + field + ")");
-            assertTrue(ttl >= minMaxTTL);
+            assert (ttl >= minMaxTTL) : "ttl must be greater than or equal to 
minMaxTTL, but " + ttl + " is less than " + minMaxTTL;
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to