cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r1084748 - /cassandra/trunk/test/system/test_cql.py
Date Wed, 23 Mar 2011 21:17:36 GMT
Author: eevans
Date: Wed Mar 23 21:17:36 2011
New Revision: 1084748

URL: http://svn.apache.org/viewvc?rev=1084748&view=rev
Log:
improved timeuuid system test (CQL)

Patch by eevans

Modified:
    cassandra/trunk/test/system/test_cql.py

Modified: cassandra/trunk/test/system/test_cql.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/system/test_cql.py?rev=1084748&r1=1084747&r2=1084748&view=diff
==============================================================================
--- cassandra/trunk/test/system/test_cql.py (original)
+++ cassandra/trunk/test/system/test_cql.py Wed Mar 23 21:17:36 2011
@@ -504,8 +504,20 @@ class TestCql(ThriftTester):
         ms = uuid1bytes_to_millis(r[0].columns[0].value.bytes)
         assert ((time.time() * 1e3) - ms) < 100, \
             "new timeuuid not within 100ms of now (UPDATE vs. SELECT)"
+
+        uuid_range = []
+        update = "UPDATE StandardTimeUUID SET ? = ? WHERE KEY = slicetest"
+        for i in range(5):
+            uuid_range.append(uuid.uuid1())
+            conn.execute(update, uuid_range[i], i)
+
+        r = conn.execute("""
+            SELECT ?..? FROM StandardTimeUUID WHERE KEY = slicetest
+        """, uuid_range[0], uuid_range[len(uuid_range)-1])
+        
+        for (i, col) in enumerate(r[0]):
+            assert uuid_range[i] == col.name
         
-        # TODO: slices of timeuuids from cf w/ TimeUUIDType comparator
         
     def test_lexical_uuid(self):
         "store and retrieve lexical uuids"



Mime
View raw message