use of org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp in project tracecompass by tracecompass.
the class TmfUml2SDSyncLoaderSignalTest method verifyFirstPageSignal.
/**
* Test Case: 001
* Description: Verify that time range signal is send with correct values when going to first page
* Verified Methods: broadcast()
* Expected result: Time range sync signal is sent with correct range and current time.
*/
@Test
public void verifyFirstPageSignal() {
TmfTimestamp currentTime = new Uml2SDTestTimestamp(9788641608418L);
range = new TmfTimeRange(currentTime, new Uml2SDTestTimestamp(currentTime.getValue() + rangeWindow.getValue()));
fTmfComponent.setSignalError(false);
fTmfComponent.setSourceError(false);
fTmfComponent.setRangeError(false);
fTmfComponent.setWindowRangeSignalReceived(false);
// set expected values
fTmfComponent.setSource(fFacility.getLoader());
fTmfComponent.setCurrentRange(range);
fFacility.firstPage();
WaitUtils.waitUntil(validator -> validator.isWindowRangeSignalReceived(), fTmfComponent, "Window range signal not received");
assertFalse("TmfRangeSynchSignal", fTmfComponent.isSignalError());
assertFalse("TmfRangeSynchSignal", fTmfComponent.isSourceError());
assertFalse("TmfRangeSynchSignal", fTmfComponent.isRangeError());
}
use of org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp in project tracecompass by tracecompass.
the class TmfUml2SDSyncLoaderSignalTest method setUpClass.
/**
* Initialization
*/
@BeforeClass
public static void setUpClass() {
fFacility = Uml2SDTestFacility.getInstance();
fFacility.init();
fFacility.selectExperiment();
range = new TmfTimeRange(new Uml2SDTestTimestamp(9789689220871L), new Uml2SDTestTimestamp(9789773881426L));
// Get range window for tests below
rangeWindow = (TmfTimestamp) range.getEndTime().getDelta(range.getStartTime());
TmfTimestamp currentTime = new Uml2SDTestTimestamp(9789773782043L);
fFacility.getTrace().broadcast(new TmfWindowRangeUpdatedSignal(fFacility, range));
fFacility.getTrace().broadcast(new TmfSelectionRangeUpdatedSignal(fFacility, currentTime));
fFacility.delay(IUml2SDTestConstants.BROADCAST_DELAY);
fTmfComponent = new Uml2SDSignalValidator();
}
Aggregations