Program: 6104
Project: 6104
Buggy source:
@Test public void testPipelineWithAllActions() throws Exception {
  String actionTable="String_Node_Str";
  String action1RowKey="String_Node_Str";
  String action1ColumnKey="String_Node_Str";
  String action1Value="String_Node_Str";
  String action2RowKey="String_Node_Str";
  String action2ColumnKey="String_Node_Str";
  String action2Value="String_Node_Str";
  String action3RowKey="String_Node_Str";
  String action3ColumnKey="String_Node_Str";
  String action3Value="String_Node_Str";
  ETLBatchConfig etlConfig=ETLBatchConfig.builder("String_Node_Str").addStage(new ETLStage("String_Node_Str",MockAction.getPlugin(actionTable,action1RowKey,action1ColumnKey,action1Value))).addStage(new ETLStage("String_Node_Str",MockAction.getPlugin(actionTable,action2RowKey,action2ColumnKey,action2Value))).addStage(new ETLStage("String_Node_Str",MockAction.getPlugin(actionTable,action3RowKey,action3ColumnKey,action3Value))).addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").setEngine(Engine.MAPREDUCE).build();
  AppRequest<ETLBatchConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  ApplicationManager appManager=deployApplication(appId,appRequest);
  WorkflowManager workflowManager=appManager.getWorkflowManager(SmartWorkflow.NAME);
  workflowManager.start();
  workflowManager.waitForFinish(5,TimeUnit.MINUTES);
  DataSetManager<Table> actionTableDS=getDataset(actionTable);
  Assert.assertEquals(action1Value,MockAction.readOutput(actionTableDS,action1RowKey,action1ColumnKey));
  Assert.assertEquals(action2Value,MockAction.readOutput(actionTableDS,action2RowKey,action2ColumnKey));
  Assert.assertEquals(action3Value,MockAction.readOutput(actionTableDS,action3RowKey,action3ColumnKey));
}

Fixed version (ground truth):
@Test public void testPipelineWithAllActions() throws Exception {
  String actionTable="String_Node_Str";
  String action1RowKey="String_Node_Str";
  String action1ColumnKey="String_Node_Str";
  String action1Value="String_Node_Str";
  String action2RowKey="String_Node_Str";
  String action2ColumnKey="String_Node_Str";
  String action2Value="String_Node_Str";
  String action3RowKey="String_Node_Str";
  String action3ColumnKey="String_Node_Str";
  String action3Value="String_Node_Str";
  ETLBatchConfig etlConfig=ETLBatchConfig.builder("String_Node_Str").addStage(new ETLStage("String_Node_Str",MockAction.getPlugin(actionTable,action1RowKey,action1ColumnKey,action1Value))).addStage(new ETLStage("String_Node_Str",MockAction.getPlugin(actionTable,action2RowKey,action2ColumnKey,action2Value))).addStage(new ETLStage("String_Node_Str",MockAction.getPlugin(actionTable,action3RowKey,action3ColumnKey,action3Value))).addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").setEngine(Engine.MAPREDUCE).build();
  AppRequest<ETLBatchConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  ApplicationManager appManager=deployApplication(appId,appRequest);
  WorkflowManager workflowManager=appManager.getWorkflowManager(SmartWorkflow.NAME);
  workflowManager.start();
  workflowManager.waitForFinish(5,TimeUnit.MINUTES);
  DataSetManager<Table> actionTableDS=getDataset(actionTable);
  Assert.assertEquals(action1Value,MockAction.readOutput(actionTableDS,action1RowKey,action1ColumnKey));
  Assert.assertEquals(action2Value,MockAction.readOutput(actionTableDS,action2RowKey,action2ColumnKey));
  Assert.assertEquals(action3Value,MockAction.readOutput(actionTableDS,action3RowKey,action3ColumnKey));
  List<RunRecord> history=workflowManager.getHistory(ProgramRunStatus.COMPLETED);
  Assert.assertEquals(1,history.size());
  String runId=history.get(0).getPid();
  WorkflowTokenDetail tokenDetail=workflowManager.getToken(runId,WorkflowToken.Scope.USER,action1RowKey + action1ColumnKey);
  validateToken(tokenDetail,action1RowKey + action1ColumnKey,action1Value);
  tokenDetail=workflowManager.getToken(runId,WorkflowToken.Scope.USER,action2RowKey + action2ColumnKey);
  validateToken(tokenDetail,action2RowKey + action2ColumnKey,action2Value);
  tokenDetail=workflowManager.getToken(runId,WorkflowToken.Scope.USER,action3RowKey + action3ColumnKey);
  validateToken(tokenDetail,action3RowKey + action3ColumnKey,action3Value);
}