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

updated tests to the new api

parent 3dd89605
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ public abstract class ConfigurationContext extends Configuration {
*/
@Override
protected final void addThreadableStage(final Stage stage) {
if (this.threadableStages.add(stage)) {
if (!this.threadableStages.add(stage)) {
LOGGER.warn("Stage " + stage.getId() + " was already marked as threadable stage.");
}
}
......
......@@ -47,8 +47,5 @@ public class CipherConfiguration extends ConfigurationContext {
connectPorts(decomp.getOutputPort(), decrypt.getInputPort());
connectPorts(decrypt.getOutputPort(), writer.getInputPort());
// this.getFiniteProducerStages().add(init);
this.addThreadableStage(init);
}
}
......@@ -50,7 +50,6 @@ public class TokenizerConfiguration extends ConfigurationContext {
connectPorts(b2s.getOutputPort(), tokenizer.getInputPort());
connectPorts(tokenizer.getOutputPort(), this.counter.getInputPort());
this.addThreadableStage(init);
}
public int getTokenCount() {
......
......@@ -77,7 +77,6 @@ public class ExecutionTest {
final InitialElementProducer<String> init = new InitialElementProducer<String>("Hello");
delay = new DelayAndTerminate(DELAY_IN_MS);
connectPorts(init.getOutputPort(), delay.getInputPort());
addThreadableStage(init);
}
}
......@@ -118,7 +117,6 @@ public class ExecutionTest {
public AnalysisTestConfig(final boolean inter) {
connectPorts(init.getOutputPort(), sink.getInputPort());
addThreadableStage(init);
if (inter) {
addThreadableStage(sink);
}
......@@ -145,7 +143,6 @@ public class ExecutionTest {
connectPorts(init.getOutputPort(), iof.getInputPort());
connectPorts(iof.getMatchedOutputPort(), sink.getInputPort());
connectPorts(init.createOutputPort(), sink.createInputPort());
addThreadableStage(init);
addThreadableStage(iof);
}
}
......
......@@ -61,7 +61,6 @@ public class StageTest {
init = new InitialElementProducer<String>("Hello");
delay = new DelayAndTerminate(0);
connectPorts(init.getOutputPort(), delay.getInputPort());
addThreadableStage(init);
}
}
......
......@@ -91,7 +91,6 @@ public class TraversorTest {
connectPorts(merger.getOutputPort(), result.getInputPort());
// Add the first and last part to the threadable stages
addThreadableStage(init);
addThreadableStage(merger);
}
......
......@@ -32,6 +32,6 @@ public class ExceptionTestConfiguration extends ConfigurationContext {
// this.addThreadableStage(new ExceptionTestStage());
this.addThreadableStage(second);
// this.addThreadableStage(third);
this.addThreadableStage(third);
}
}
......@@ -29,8 +29,8 @@ import java.util.List;
import org.junit.Before;
import org.junit.Test;
import teetime.framework.Execution;
import teetime.framework.ConfigurationContext;
import teetime.framework.Execution;
import teetime.framework.ExecutionException;
import teetime.util.Pair;
......@@ -134,7 +134,6 @@ public class InstanceOfFilterTest {
connectPorts(instanceOfFilter.getMatchedOutputPort(), clazzCollector.getInputPort());
connectPorts(instanceOfFilter.getMismatchedOutputPort(), mismatchedCollector.getInputPort());
addThreadableStage(elementProducer);
}
}
......
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