MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / parseFromColumnWithUIDMetaNSU

Method parseFromColumnWithUIDMetaNSU

test/meta/TestTSMeta.java:428–450  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

426 }
427
428 @Test (expected = NoSuchUniqueId.class)
429 public void parseFromColumnWithUIDMetaNSU() throws Exception {
430 class ErrBack implements Callback<Object, Exception> {
431 @Override
432 public Object call(Exception e) throws Exception {
433 Throwable ex = e;
434 while (ex.getClass().equals(DeferredGroupException.class)) {
435 ex = ex.getCause();
436 }
437 throw (Exception)ex;
438 }
439 }
440
441 final KeyValue column = mock(KeyValue.class);
442 when(column.key()).thenReturn(new byte[] { 0, 0, 1, 0, 0, 1, 0, 0, 2 });
443 when(column.value()).thenReturn(("{\"tsuid\":\"000001000001000002\",\"" +
444 "description\":\"Description\",\"notes\":\"Notes\",\"created\":1328140800," +
445 "\"custom\":null,\"units\":\"\",\"retention\":42,\"max\":1.0,\"min\":" +
446 "\"NaN\",\"displayName\":\"Display\",\"dataType\":\"Data\"}")
447 .getBytes(MockBase.ASCII()));
448 TSMeta.parseFromColumn(tsdb, column, true).addErrback(new ErrBack())
449 .joinUninterruptibly();
450 }
451}

Callers

nothing calls this directly

Calls 5

ASCIIMethod · 0.95
parseFromColumnMethod · 0.95
keyMethod · 0.65
valueMethod · 0.45
getBytesMethod · 0.45

Tested by

no test coverage detected