cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r788775 - /incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/TimeSortTest.java
Date Fri, 26 Jun 2009 17:26:26 GMT
Author: jbellis
Date: Fri Jun 26 17:26:26 2009
New Revision: 788775

URL: http://svn.apache.org/viewvc?rev=788775&view=rev
Log:
add test showing timefilter failure

Modified:
    incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/TimeSortTest.java

Modified: incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/TimeSortTest.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/TimeSortTest.java?rev=788775&r1=788774&r2=788775&view=diff
==============================================================================
--- incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/TimeSortTest.java (original)
+++ incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/TimeSortTest.java Fri Jun
26 17:26:26 2009
@@ -31,6 +31,28 @@
 public class TimeSortTest extends CleanupHelper
 {
     @Test
+    public void testMixedSources() throws IOException, ExecutionException, InterruptedException
+    {
+        Table table = Table.open("Table1");
+        RowMutation rm;
+
+        rm = new RowMutation("Table1", "key0");
+        rm.add("StandardByTime1:C0", "a".getBytes(), 100);
+        rm.apply();
+        table.getColumnFamilyStore("StandardByTime1").forceBlockingFlush();
+
+        rm = new RowMutation("Table1", "key0");
+        rm.add("StandardByTime1:C1", "b".getBytes(), 0);
+        rm.apply();
+
+        Row row = table.getRow("key0", "StandardByTime1", 10);
+        assert !row.isEmpty();
+        ColumnFamily cf = row.getColumnFamilies().iterator().next();
+        SortedSet<IColumn> columns = cf.getAllColumns();
+        assert columns.size() == 1;
+    }
+
+    @Test
     public void testTimeSort() throws IOException, ExecutionException, InterruptedException
     {
         Table table = Table.open("Table1");



Mime
View raw message