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

Method fetchException

test/core/TestMultiGetQuery.java:771–788  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

769 }
770
771 @Test
772 public void fetchException() throws Exception {
773 setupStorage();
774 final RuntimeException e = new RuntimeException("Boo!");
775 storage.throwException(getRowKey(METRIC_STRING, (int) start_ts, TAGK_STRING,
776 "A", TAGK_B_STRING, "D"), e);
777 MultiGetQuery mgq = new MultiGetQuery(tsdb, query, METRIC_BYTES, q_tags_AD,
778 start_ts, end_ts, tsdb.dataTable(), spans, null, 0, null, query_stats,
779 0, 10000000, false, false);
780
781 try {
782 mgq.fetch().join();
783 fail("Expected RuntimeException");
784 } catch (RuntimeException ex) {
785 assertSame(ex, e);
786 }
787 verify(client, times(1)).get(anyList());
788 }
789
790 /**
791 * Validates the data setup in {@link #setupStorage()} is returned in the requests.

Callers

nothing calls this directly

Calls 6

setupStorageMethod · 0.95
fetchMethod · 0.95
throwExceptionMethod · 0.80
dataTableMethod · 0.80
getRowKeyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected