Description
Scan should be empty if compaction canceled. Actual is {a1 colF3:colQ3 [] 1432871214628 false=1, c1 colF3:colQ3 [] 1432871214628 false=1}
It looks like the test is making an assumption that we'll see all of the entries this iterator makes.
static { SortedMap<Key,Value> t = new TreeMap<>(); t.put(new Key(new Text("a1"), new Text("colF3"), new Text("colQ3"), System.currentTimeMillis()), new Value("1".getBytes())); t.put(new Key(new Text("c1"), new Text("colF3"), new Text("colQ3"), System.currentTimeMillis()), new Value("1".getBytes())); t.put(new Key(new Text("m1"), new Text("colF3"), new Text("colQ3"), System.currentTimeMillis()), new Value("1".getBytes())); allEntriesToInject = Collections.unmodifiableSortedMap(t); // for safety }
However, because the split is added to the table prior to the compaction
splitset.add(new Text("f"));
It's possible that we see no entries, the "m1" key, the "a1" and "c1" keys, or all three keys. The test doesn't consider the middle two cases, and expects all or none.