/** Test the repetiotion parsing for parallel tasks */
public void testParseParallelTaskSequenceRepetition() throws Exception {
String taskStr = "AddDoc";
String parsedTasks = "[ "+taskStr+" ] : 1000";
Benchmark benchmark = new Benchmark(new StringReader(propPart+parsedTasks));
Algorithm alg = benchmark.getAlgorithm();
ArrayList<PerfTask> algTasks = alg.extractTasks();
boolean foundAdd = false;
for (final PerfTask task : algTasks) {
if (task.toString().indexOf(taskStr)>=0) {
foundAdd = true;
}
if (task instanceof TaskSequence) {
assertEquals("repetions should be 1000 for "+parsedTasks, 1000, ((TaskSequence) task).getRepetitions());
assertTrue("sequence for "+parsedTasks+" should be parallel!", ((TaskSequence) task).isParallel());
}
assertTrue("Task "+taskStr+" was not found in "+alg.toString(),foundAdd);
}
}