accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1230232 - /incubator/accumulo/trunk/src/server/src/test/java/org/apache/accumulo/server/tabletserver/InMemoryMapTest.java
Date Wed, 11 Jan 2012 20:24:01 GMT
Author: vines
Date: Wed Jan 11 20:24:01 2012
New Revision: 1230232

URL: http://svn.apache.org/viewvc?rev=1230232&view=rev
Log:
ACCUMULO-227 - junit test goodness

Modified:
    incubator/accumulo/trunk/src/server/src/test/java/org/apache/accumulo/server/tabletserver/InMemoryMapTest.java

Modified: incubator/accumulo/trunk/src/server/src/test/java/org/apache/accumulo/server/tabletserver/InMemoryMapTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/test/java/org/apache/accumulo/server/tabletserver/InMemoryMapTest.java?rev=1230232&r1=1230231&r2=1230232&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/test/java/org/apache/accumulo/server/tabletserver/InMemoryMapTest.java
(original)
+++ incubator/accumulo/trunk/src/server/src/test/java/org/apache/accumulo/server/tabletserver/InMemoryMapTest.java
Wed Jan 11 20:24:01 2012
@@ -275,4 +275,18 @@ public class InMemoryMapTest extends Tes
     ae(skvi1, "r1", "foo:cq1", 3, "bar1");
     
   }
+  
+  public void testDuplicateKey() throws Exception {
+    InMemoryMap imm = new InMemoryMap(false, "/tmp");
+    
+    Mutation m = new Mutation(new Text("r1"));
+    m.put(new Text("foo"), new Text("cq"), 3, new Value("v1".getBytes()));
+    m.put(new Text("foo"), new Text("cq"), 3, new Value("v2".getBytes()));
+    imm.mutate(Collections.singletonList(m));
+    
+    MemoryIterator skvi1 = imm.skvIterator();
+    skvi1.seek(new Range(), LocalityGroupUtil.EMPTY_CF_SET, false);
+    ae(skvi1, "r1", "foo:cq", 3, "v2");
+    ae(skvi1, "r1", "foo:cq", 3, "v1");
+  }
 }



Mime
View raw message