Search in sources :

Example 6 with MetricsGraphException

use of ddf.metrics.reporting.internal.MetricsGraphException in project ddf by codice.

the class RrdMetricsRetrieverTest method testInvalidDataSourceType.

@Test
public // (expected = MetricsGraphException.class)
void testInvalidDataSourceType() throws Exception {
    String rrdFilename = TEST_DIR + "dummy_Absolute" + RRD_FILE_EXTENSION;
    long endTime = new RrdFileBuilder().rrdFileName(rrdFilename).numSamples(4).dsType(DsType.ABSOLUTE).build();
    MetricsRetriever metricsRetriever = new RrdMetricsRetriever();
    try {
        metricsRetriever.createGraph("Dummy", rrdFilename, START_TIME, endTime);
        fail();
    } catch (MetricsGraphException e) {
    }
}
Also used : MetricsGraphException(ddf.metrics.reporting.internal.MetricsGraphException) MetricsRetriever(ddf.metrics.reporting.internal.MetricsRetriever) Test(org.junit.Test)

Aggregations

MetricsGraphException (ddf.metrics.reporting.internal.MetricsGraphException)6 MetricsEndpointException (ddf.metrics.reporting.internal.MetricsEndpointException)2 MetricsRetriever (ddf.metrics.reporting.internal.MetricsRetriever)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 OutputStream (java.io.OutputStream)2 Calendar (java.util.Calendar)2 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 Response (javax.ws.rs.core.Response)2 ResponseBuilder (javax.ws.rs.core.Response.ResponseBuilder)2 Test (org.junit.Test)2 DsType (org.rrd4j.DsType)2 RrdDb (org.rrd4j.core.RrdDb)2 ArrayList (java.util.ArrayList)1 Datasource (org.rrd4j.core.Datasource)1 FetchData (org.rrd4j.core.FetchData)1 FetchRequest (org.rrd4j.core.FetchRequest)1