manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1206469 - /incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java
Date Sat, 26 Nov 2011 16:04:22 GMT
Author: kwright
Date: Sat Nov 26 16:04:21 2011
New Revision: 1206469

URL: http://svn.apache.org/viewvc?rev=1206469&view=rev
Log:
Add a test for CriteriaBetween

Modified:
    incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java

Modified: incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java?rev=1206469&r1=1206468&r2=1206469&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java
(original)
+++ incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java
Sat Nov 26 16:04:21 2011
@@ -319,6 +319,19 @@ public class SanityTest
     assertEquals(accessor.hasNext(),false);
     ts.abandonTransaction();
 
+    ts.beginTransaction();
+    index = ts.lookupIndex("testindex");
+    accessor = index.buildAccessor(new IndexCriteria[]{new CriteriaBetween(new LongValue(123L),new
LongValue(333L))});
+    assertEquals(accessor.hasNext(),true);
+    rowID = accessor.getNext();
+    assertNotNull(rowID);
+    value = index.getValue(rowID,"colA");
+    assertNotNull(value);
+    assertEquals("org.apache.warthog.common.LongValue",value.getClass().getName());
+    assertEquals(124L,((LongValue)value).getValue());
+    assertEquals(accessor.hasNext(),false);
+    ts.abandonTransaction();
+
     // Delete a table row and see if it goes away from the index
     ts.beginTransaction();
     table = ts.lookupTable("testtable");



Mime
View raw message