use of org.iobserve.stages.general.DynamicEventDispatcher in project iobserve-analysis by research-iobserve.
the class DynamicEventDispatcherTest method checkDeploymentDetection.
/**
* Check whether all deployment records are found.
*/
@Test
public void checkDeploymentDetection() {
final DynamicEventDispatcher eventDispatcher = new DynamicEventDispatcher(this.kiekerMetadataMatcher, true, true, false);
final List<IDeployedEvent> localDeploymentRecords = new ArrayList<>();
StageTester.test(eventDispatcher).and().send(this.inputRecords).to(eventDispatcher.getInputPort()).and().receive(localDeploymentRecords).from(this.deployedEventMatcher.getOutputPort()).start();
Assert.assertThat("Did not collect all deployment events.", (int) eventDispatcher.getEventCount(), Is.is(this.inputRecords.size()));
Assert.assertEquals("Wrong number of deployments", this.deploymentRecords.size(), localDeploymentRecords.size());
}
use of org.iobserve.stages.general.DynamicEventDispatcher in project iobserve-analysis by research-iobserve.
the class DynamicEventDispatcherTest method checkTraceMetadataDetection.
/**
* Check whether all trace metadata records are found.
*/
@Test
public void checkTraceMetadataDetection() {
final DynamicEventDispatcher eventDispatcher = new DynamicEventDispatcher(this.kiekerMetadataMatcher, true, true, false);
final List<TraceMetadata> localTraceMetadataRecords = new ArrayList<>();
StageTester.test(eventDispatcher).and().send(this.inputRecords).to(eventDispatcher.getInputPort()).and().receive(localTraceMetadataRecords).from(this.traceMetadataMatcher.getOutputPort()).start();
Assert.assertThat("Did not collect all trace metadata events.", (int) eventDispatcher.getEventCount(), Is.is(this.inputRecords.size()));
Assert.assertEquals("Wrong number of trace metadata", this.traceMetadataRecords.size(), localTraceMetadataRecords.size());
}
use of org.iobserve.stages.general.DynamicEventDispatcher in project iobserve-analysis by research-iobserve.
the class DynamicEventDispatcherTest method checkLogCounting.
/**
* Test reporting elements of the record switch.
*/
@Test
public void checkLogCounting() {
final DynamicEventDispatcher eventDispatcher = new DynamicEventDispatcher(this.kiekerMetadataMatcher, true, true, false);
final List<IMonitoringRecord> thousandRecords = new ArrayList<>();
for (int i = 0; i < 2000; i++) {
thousandRecords.addAll(this.otherRecords);
}
StageTester.test(eventDispatcher).and().send(thousandRecords).to(eventDispatcher.getInputPort()).start();
Assert.assertThat((int) eventDispatcher.getEventCount(), Is.is(thousandRecords.size()));
}
use of org.iobserve.stages.general.DynamicEventDispatcher in project iobserve-analysis by research-iobserve.
the class DynamicEventDispatcherTest method checkUndeploymentDetection.
/**
* Check whether all undeployment events are found.
*/
@Test
public void checkUndeploymentDetection() {
final DynamicEventDispatcher eventDispatcher = new DynamicEventDispatcher(this.kiekerMetadataMatcher, true, true, false);
final List<IUndeployedEvent> localUndeploymentRecords = new ArrayList<>();
StageTester.test(eventDispatcher).and().send(this.inputRecords).to(eventDispatcher.getInputPort()).and().receive(localUndeploymentRecords).from(this.undeployedEventMatcher.getOutputPort()).start();
Assert.assertThat("Did not collect all undeployment events.", (int) eventDispatcher.getEventCount(), Is.is(this.inputRecords.size()));
// Assert.assertEquals("Wrong number of undeployments", this.undeploymentRecords.size(),
// localUndeploymentRecords.size());
}
use of org.iobserve.stages.general.DynamicEventDispatcher in project iobserve-analysis by research-iobserve.
the class DynamicEventDispatcherTest method checkAllocationDetection.
/**
* Check whether all allocation events are found.
*/
@Test
public void checkAllocationDetection() {
final DynamicEventDispatcher eventDispatcher = new DynamicEventDispatcher(this.kiekerMetadataMatcher, true, true, false);
final List<IAllocationEvent> localAllocationRecords = new ArrayList<>();
StageTester.test(eventDispatcher).and().send(this.inputRecords).to(eventDispatcher.getInputPort()).and().receive(localAllocationRecords).from(this.allocationEventMatcher.getOutputPort()).start();
Assert.assertThat("Did not collect all allocation events.", (int) eventDispatcher.getEventCount(), Is.is(this.inputRecords.size()));
// Assert.assertEquals("Wrong number of allocations", this.allocationRecords.size(),
// localAllocationRecords.size());
}
Aggregations