@Test public void testExecuteTransaction_WithVariousDeploymentSpecs_ExpectsCorrectTaskGraph() throws Exception { this.factoryTask.deleteDSFromDbTask = new DeleteDSFromDbTask(); this.factoryTask.mgrCheckDevicesMetaTask = new MgrCheckDevicesMetaTask(); this.factoryTask.deleteK8sDAIInspectionPortTask = new DeleteK8sDAIInspectionPortTask(); this.factoryTask.createOrUpdateK8sDeploymentSpecMetaTask = new CreateOrUpdateK8sDeploymentSpecMetaTask(); this.factoryTask.deleteK8sDeploymentTask = new DeleteK8sDeploymentTask(); ConformK8sDeploymentSpecMetaTask task = this.factoryTask.create(this.ds); task.execute(); TaskGraphHelper.validateTaskGraph(task, this.expectedGraph); }
public ConformK8sDeploymentSpecMetaTask create(DeploymentSpec ds) { ConformK8sDeploymentSpecMetaTask task = new ConformK8sDeploymentSpecMetaTask(); task.deleteK8sDAIInspectionPortTask = this.deleteK8sDAIInspectionPortTask; task.deleteK8sDeploymentTask = this.deleteK8sDeploymentTask; task.createOrUpdateK8sDeploymentSpecMetaTask = this.createOrUpdateK8sDeploymentSpecMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteDSFromDbTask = this.deleteDSFromDbTask; task.ds = ds; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }
ConformK8sDeploymentSpecMetaTask extends TransactionalMetaTask { public ConformK8sDeploymentSpecMetaTask create(DeploymentSpec ds) { ConformK8sDeploymentSpecMetaTask task = new ConformK8sDeploymentSpecMetaTask(); task.deleteK8sDAIInspectionPortTask = this.deleteK8sDAIInspectionPortTask; task.deleteK8sDeploymentTask = this.deleteK8sDeploymentTask; task.createOrUpdateK8sDeploymentSpecMetaTask = this.createOrUpdateK8sDeploymentSpecMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteDSFromDbTask = this.deleteDSFromDbTask; task.ds = ds; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; } }
ConformK8sDeploymentSpecMetaTask extends TransactionalMetaTask { public ConformK8sDeploymentSpecMetaTask create(DeploymentSpec ds) { ConformK8sDeploymentSpecMetaTask task = new ConformK8sDeploymentSpecMetaTask(); task.deleteK8sDAIInspectionPortTask = this.deleteK8sDAIInspectionPortTask; task.deleteK8sDeploymentTask = this.deleteK8sDeploymentTask; task.createOrUpdateK8sDeploymentSpecMetaTask = this.createOrUpdateK8sDeploymentSpecMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteDSFromDbTask = this.deleteDSFromDbTask; task.ds = ds; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  }
ConformK8sDeploymentSpecMetaTask extends TransactionalMetaTask { public ConformK8sDeploymentSpecMetaTask create(DeploymentSpec ds) { ConformK8sDeploymentSpecMetaTask task = new ConformK8sDeploymentSpecMetaTask(); task.deleteK8sDAIInspectionPortTask = this.deleteK8sDAIInspectionPortTask; task.deleteK8sDeploymentTask = this.deleteK8sDeploymentTask; task.createOrUpdateK8sDeploymentSpecMetaTask = this.createOrUpdateK8sDeploymentSpecMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteDSFromDbTask = this.deleteDSFromDbTask; task.ds = ds; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  ConformK8sDeploymentSpecMetaTask create(DeploymentSpec ds); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override TaskGraph getTaskGraph(); @Override Set<LockObjectReference> getObjects(); }
ConformK8sDeploymentSpecMetaTask extends TransactionalMetaTask { public ConformK8sDeploymentSpecMetaTask create(DeploymentSpec ds) { ConformK8sDeploymentSpecMetaTask task = new ConformK8sDeploymentSpecMetaTask(); task.deleteK8sDAIInspectionPortTask = this.deleteK8sDAIInspectionPortTask; task.deleteK8sDeploymentTask = this.deleteK8sDeploymentTask; task.createOrUpdateK8sDeploymentSpecMetaTask = this.createOrUpdateK8sDeploymentSpecMetaTask; task.mgrCheckDevicesMetaTask = this.mgrCheckDevicesMetaTask; task.deleteDSFromDbTask = this.deleteDSFromDbTask; task.ds = ds; task.dbConnectionManager = this.dbConnectionManager; task.txBroadcastUtil = this.txBroadcastUtil; return task; }  ConformK8sDeploymentSpecMetaTask create(DeploymentSpec ds); @Override void executeTransaction(EntityManager em); @Override String getName(); @Override TaskGraph getTaskGraph(); @Override Set<LockObjectReference> getObjects();  }