| 163 | } |
| 164 | |
| 165 | @Test |
| 166 | public void oneCellAppend() throws Exception { |
| 167 | ArrayList<KeyValue> kvs = new ArrayList<KeyValue>(1); |
| 168 | ArrayList<Annotation> annotations = new ArrayList<Annotation>(0); |
| 169 | final byte[] qual = { 0x00, 0x07 }; |
| 170 | final byte[] val = Bytes.fromLong(42L); |
| 171 | kvs.add(makekv(AppendDataPoints.APPEND_COLUMN_QUALIFIER, |
| 172 | MockBase.concatByteArrays(qual, val))); |
| 173 | final KeyValue kv = compactionq.compact(kvs, annotations, null); |
| 174 | assertArrayEquals(qual, kv.qualifier()); |
| 175 | assertArrayEquals(val, kv.value()); |
| 176 | |
| 177 | // We had nothing to do so... |
| 178 | // ... verify there were no put. |
| 179 | verify(tsdb, never()).put(anyBytes(), anyBytes(), anyBytes(), anyLong()); |
| 180 | // ... verify there were no delete. |
| 181 | verify(tsdb, never()).delete(anyBytes(), any(byte[][].class)); |
| 182 | } |
| 183 | |
| 184 | @Test |
| 185 | public void oneCellRowWAnnotation() throws Exception { |