Skip to content
Snippets Groups Projects
Commit 9f21618d authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

Quick fix for #151

parent b5d2c03e
No related branches found
No related tags found
No related merge requests found
......@@ -58,10 +58,10 @@ public abstract class AbstractStage extends Stage {
public void onSignal(final ISignal signal, final InputPort<?> inputPort) {
if (!this.signalAlreadyReceived(signal, inputPort)) {
signal.trigger(this);
for (OutputPort<?> outputPort : outputPorts) {
outputPort.sendSignal(signal);
}
}
}
......
......@@ -47,6 +47,9 @@ final class RunnableConsumerStage extends AbstractRunnableStage {
for (InputPort<?> inputPort : inputPorts) {
inputPort.waitForStartSignal();
}
for (InputPort<?> inputPort : inputPorts) {
inputPort.waitForStartSignal();
}
logger.trace("Starting..." + stage);
}
......
......@@ -42,7 +42,6 @@ public final class MultipleInstanceOfFilter<I> extends AbstractConsumerStage<I>
@SuppressWarnings("unchecked")
public void onStarting() throws Exception {
super.onStarting();
// We cache the map to avoid the creating of iterators during runtime
cachedOutputPortsMap = (Entry<Class<? extends I>, OutputPort<? super I>>[]) outputPortsMap.entrySet().toArray(new Entry<?, ?>[outputPortsMap.size()]);
}
......
......@@ -16,7 +16,9 @@
package teetime.stage;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.assertThat;
import java.util.ArrayList;
......@@ -42,6 +44,7 @@ public class MultipleInstanceOfFilterTest {
StageTester.test(filter).and().send(input).to(filter.getInputPort()).and().receive(result).from(filter.getOutputPortForType(String.class)).start();
assertThat(result, is(not(empty())));
assertThat(result, contains("1", "2", "3"));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment