MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / scanBadRowKey

Method scanBadRowKey

test/core/TestSaltScanner.java:367–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

365 }
366
367 @Test (expected = IllegalDataException.class)
368 public void scanBadRowKey() throws Exception {
369 setupMockScanners(false);
370
371 final ArrayList<ArrayList<KeyValue>> rows =
372 new ArrayList<ArrayList<KeyValue>>(1);
373 final ArrayList<KeyValue> row = new ArrayList<KeyValue>(1);
374 rows.add(row);
375 final byte[] key = { 0x00, 0x00, 0x00, 0x02,
376 0x51, (byte) 0x0B, 0x13, (byte) 0x90, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01 };
377 row.add(new KeyValue(key, FAMILY, QUALIFIER_A, 0, VALUE));
378 kvs_a.set(2, rows);
379
380 when(scanner_a.nextRows())
381 .thenReturn(Deferred.fromResult(kvs_a.get(0)))
382 .thenReturn(Deferred.fromResult(kvs_a.get(1)))
383 .thenReturn(Deferred.fromResult(kvs_a.get(2)))
384 .thenReturn(Deferred.<ArrayList<ArrayList<KeyValue>>>fromResult(null));
385
386 final SaltScanner scanner = new SaltScanner(tsdb, METRIC_BYTES, scanners,
387 spans, filters);
388 scanner.scan().joinUninterruptibly();
389 }
390
391 @SuppressWarnings("unchecked")
392 @Test (expected = IllegalDataException.class)

Callers

nothing calls this directly

Calls 5

setupMockScannersMethod · 0.95
scanMethod · 0.95
setMethod · 0.80
addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected