Package org.lightfish.business.servermonitoring.control.collectors

Examples of org.lightfish.business.servermonitoring.control.collectors.DataPoint


    }

    @Test
    public void action_all_good() throws Exception {
        DataCollector collector = mock(DataCollector.class);
        DataPoint expectedResult = mock(DataPoint.class);
        when(collector.collect()).thenReturn(expectedResult);
        Future compute = action.compute(collector);
        assertEquals(expectedResult, compute.get());
    }
View Full Code Here


    }

    @Test
    public void action_with_retry() throws Exception {
        DataCollector collector = mock(DataCollector.class);
        DataPoint expectedResult = mock(DataPoint.class);
        when(collector.collect())
                .thenThrow(new Exception("Ahh!!"))
                .thenReturn(expectedResult);
        Future compute = action.compute(collector);
        assertEquals(expectedResult, compute.get());
View Full Code Here

    private Snapshot serialDataCollection(String instanceName) throws Exception {
        Snapshot snapshot = new Snapshot.Builder().build();
        DataCollectionBehaviour dataCollectionBehaviour = new DataCollectionBehaviour(mapper, snapshot);
        for (DataCollector collector : retrieveDataCollectorList(instanceName)) {
            DataPoint dataPoint = serialDataCollect(collector, 0);
            dataCollectionBehaviour.perform(dataPoint);
        }
        return snapshot;
    }
View Full Code Here

TOP

Related Classes of org.lightfish.business.servermonitoring.control.collectors.DataPoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.