How to use updatePriority method of org.cerberus.crud.service.impl.TestCaseExecutionQueueService class

Best Cerberus-source code snippet using org.cerberus.crud.service.impl.TestCaseExecutionQueueService.updatePriority

Source:TestCaseExecutionQueueService.java Github

copy

Full Screen

...185 updateToState(insertedQueueId, "", targetState);186 } else {187 // In case there is at least 1 dependency, we leave the state to QUWITHDEP but move the prio to high so that when dependencies are released execution is triggered ASAP.188 object.setPriority(TestCaseExecutionQueue.PRIORITY_WHENDEPENDENCY); // pass prio to 100 if it's a QUWITHDEP189 updatePriority(insertedQueueId, TestCaseExecutionQueue.PRIORITY_WHENDEPENDENCY);190 }191 }192 } else {193 // New execution Queue from an existing one (duplicated from an existing queue entry).194 object.setState(targetState);195 ret = testCaseExecutionInQueueDAO.create(object);196 // We duplicate here the dependencies from the original exeQueue entry.197 if (ret.getItem() != null) {198 // Get the QueueId Result from inserted record.199 long insertedQueueId = ret.getItem().getId();200 // Adding dependencies201 AnswerItem<Integer> retDep = testCaseExecutionQueueDepService.insertFromExeQueueIdDep(insertedQueueId, exeQueueId);202 LOG.debug("Dep inserted from old entries : " + retDep.getItem());203 }204 }205 }206 return ret;207 }208 @Override209 public void checkAndReleaseQueuedEntry(long exeQueueId, String tag) {210 LOG.debug("Checking if we can move QUWITHDEP Queue entry to QUEUED : " + exeQueueId);211 AnswerItem ansNbWaiting = testCaseExecutionQueueDepService.readNbWaitingByExeQueueId(exeQueueId);212 int nbwaiting = (int) ansNbWaiting.getItem();213 if (nbwaiting < 1) {214 // No more waiting dependencies.215 AnswerItem ansNbReleasedNOK = testCaseExecutionQueueDepService.readNbReleasedWithNOKByExeQueueId(exeQueueId);216 int nbReleasedNOK = (int) ansNbReleasedNOK.getItem();217 if (nbReleasedNOK <= 0) {218 // If all execution of RELEASED dep are OK, we update ExeQueue status from QUWITHDEP to QUEUED in order to allow queue entry to be executed.219 updateToQueuedFromQuWithDep(exeQueueId, "All Dependencies RELEASED.");220 } else {221 try {222 String notExecutedMessage = nbReleasedNOK + " RELEASED dependency(ies) not OK.";223 updateToErrorFromQuWithDep(exeQueueId, notExecutedMessage);224 testCaseExecutionQueueDepService.manageDependenciesEndOfQueueExecution(exeQueueId);225 tagService.manageCampaignEndOfExecution(tag);226 } catch (CerberusException ex) {227 LOG.error(ex.toString(), ex);228 }229 }230 }231 }232 @Override233 public Answer update(TestCaseExecutionQueue object) {234 return testCaseExecutionInQueueDAO.update(object);235 }236 @Override237 public Answer updatePriority(long id, int priority) {238 return testCaseExecutionInQueueDAO.updatePriority(id, priority);239 }240 @Override241 public Answer updateComment(long id, String comment) {242 return testCaseExecutionInQueueDAO.updateComment(id, comment);243 }244 @Override245 public Answer updateToState(long id, String comment, TestCaseExecutionQueue.State targetState) {246 return testCaseExecutionInQueueDAO.updateToState(id, comment, targetState);247 }248 @Override249 public Answer updateToQueued(long id, String comment) {250 return testCaseExecutionInQueueDAO.updateToQueued(id, comment);251 }252 @Override...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful