How to use getID method of org.cerberus.crud.entity.RobotExecutor class

Best Cerberus-source code snippet using org.cerberus.crud.entity.RobotExecutor.getID

Source:ExecutionThreadPoolService.java Github

copy

Full Screen

1/**2 * Cerberus Copyright (C) 2013 - 2017 cerberustesting3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4 *5 * This file is part of Cerberus.6 *7 * Cerberus is free software: you can redistribute it and/or modify8 * it under the terms of the GNU General Public License as published by9 * the Free Software Foundation, either version 3 of the License, or10 * (at your option) any later version.11 *12 * Cerberus is distributed in the hope that it will be useful,13 * but WITHOUT ANY WARRANTY; without even the implied warranty of14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15 * GNU General Public License for more details.16 *17 * You should have received a copy of the GNU General Public License18 * along with Cerberus. If not, see <http://www.gnu.org/licenses/>.19 */20package org.cerberus.engine.queuemanagement.impl;21import java.util.ArrayList;22import java.util.Date;23import java.util.HashMap;24import java.util.List;25import java.util.Map;26import java.util.concurrent.Future;27import org.apache.logging.log4j.Logger;28import org.apache.logging.log4j.LogManager;29import org.cerberus.crud.entity.Application;30import org.cerberus.crud.entity.Robot;31import org.cerberus.crud.entity.RobotExecutor;32import org.cerberus.crud.factory.IFactoryRobotExecutor;33import org.cerberus.crud.service.IInvariantService;34import org.cerberus.engine.execution.IRetriesService;35import org.cerberus.engine.queuemanagement.entity.TestCaseExecutionQueueToTreat;36import org.cerberus.crud.service.IMyVersionService;37import org.cerberus.crud.service.IParameterService;38import org.cerberus.crud.service.IRobotExecutorService;39import org.cerberus.crud.service.IRobotService;40import org.cerberus.crud.service.ITestCaseExecutionQueueDepService;41import org.cerberus.crud.service.ITestCaseExecutionQueueService;42import org.cerberus.engine.queuemanagement.IExecutionThreadPoolService;43import org.cerberus.exception.CerberusException;44import org.cerberus.util.ParameterParserUtil;45import org.cerberus.util.StringUtil;46import org.cerberus.util.answer.AnswerList;47import org.springframework.beans.factory.annotation.Autowired;48import org.springframework.scheduling.annotation.Async;49import org.springframework.stereotype.Service;50/**51 * {@link IExecutionThreadPoolService} default implementation52 *53 * @author bcivel54 * @author abourdon55 */56@Service57public class ExecutionThreadPoolService implements IExecutionThreadPoolService {58 private static final Logger LOG = LogManager.getLogger(ExecutionThreadPoolService.class);59 private static final String CONST_SEPARATOR = "////";60 private boolean instanceActive = true;61 @Autowired62 private ITestCaseExecutionQueueService tceiqService;63 @Autowired64 private IParameterService parameterService;65 @Autowired66 private IInvariantService invariantService;67 @Autowired68 private IMyVersionService myVersionService;69 @Autowired70 ExecutionQueueThreadPool threadQueuePool;71 @Autowired72 private ITestCaseExecutionQueueService queueService;73 @Autowired74 private ITestCaseExecutionQueueDepService queueDepService;75 @Autowired76 private IRetriesService retriesService;77 @Autowired78 private IRobotExecutorService robotExecutorService;79 @Autowired80 private IRobotService robotService;81 @Autowired82 private IFactoryRobotExecutor factoryRobotExecutor;83 @Override84 public boolean isInstanceActive() {85 return instanceActive;86 }87 @Override88 public void setInstanceActive(boolean instanceActive) {89 this.instanceActive = instanceActive;90 }91 @Override92 public HashMap<String, Integer> getCurrentlyRunning() throws CerberusException {93 AnswerList<TestCaseExecutionQueueToTreat> answer = new AnswerList<>();94 HashMap<String, Integer> constrains_current = new HashMap<>();95 // Getting all executions already running in the queue.96 answer = tceiqService.readQueueRunning();97 List<TestCaseExecutionQueueToTreat> executionsRunning = answer.getDataList();98 // Calculate constrain values.99 for (TestCaseExecutionQueueToTreat exe : executionsRunning) {100 String const01_key = TestCaseExecutionQueueToTreat.CONSTRAIN1_GLOBAL;101 String const02_key = TestCaseExecutionQueueToTreat.CONSTRAIN2_APPLIENV + CONST_SEPARATOR + exe.getSystem() + CONST_SEPARATOR + exe.getEnvironment() + CONST_SEPARATOR + exe.getCountry() + CONST_SEPARATOR + exe.getApplication();102 String const03_key = TestCaseExecutionQueueToTreat.CONSTRAIN3_APPLICATION + CONST_SEPARATOR + exe.getApplication();103 String const04_key = TestCaseExecutionQueueToTreat.CONSTRAIN4_ROBOT + CONST_SEPARATOR + exe.getSelectedRobotHost();104 if (constrains_current.containsKey(const01_key)) {105 constrains_current.put(const01_key, constrains_current.get(const01_key) + 1);106 } else {107 constrains_current.put(const01_key, 1);108 }109 if (constrains_current.containsKey(const02_key)) {110 constrains_current.put(const02_key, constrains_current.get(const02_key) + 1);111 } else {112 constrains_current.put(const02_key, 1);113 }114 if (constrains_current.containsKey(const03_key)) {115 constrains_current.put(const03_key, constrains_current.get(const03_key) + 1);116 } else {117 constrains_current.put(const03_key, 1);118 }119 if (constrains_current.containsKey(const04_key)) {120 constrains_current.put(const04_key, constrains_current.get(const04_key) + 1);121 } else {122 constrains_current.put(const04_key, 1);123 }124 }125 return constrains_current;126 }127 @Override128 public HashMap<String, Integer> getCurrentlyPoolSizes() throws CerberusException {129 AnswerList<TestCaseExecutionQueueToTreat> answer = new AnswerList<>();130 HashMap<String, Integer> constrains_current = new HashMap<>();131 String const01_key = TestCaseExecutionQueueToTreat.CONSTRAIN1_GLOBAL;132 int poolSizeGeneral = parameterService.getParameterIntegerByKey("cerberus_queueexecution_global_threadpoolsize", "", 12);133 int poolSizeRobot = parameterService.getParameterIntegerByKey("cerberus_queueexecution_defaultrobothost_threadpoolsize", "", 10);134 constrains_current.put(const01_key, poolSizeGeneral);135 // Getting RobotHost PoolSize136 HashMap<String, Integer> robot_poolsize = new HashMap<String, Integer>();137 robot_poolsize = invariantService.readToHashMapGp1IntegerByIdname("ROBOTHOST", poolSizeRobot);138 // Getting all executions to be treated.139 answer = tceiqService.readQueueToTreatOrRunning();140 List<TestCaseExecutionQueueToTreat> executionsToTreat = answer.getDataList();141 // Calculate constrain values.142 for (TestCaseExecutionQueueToTreat exe : executionsToTreat) {143 String const02_key = TestCaseExecutionQueueToTreat.CONSTRAIN2_APPLIENV + CONST_SEPARATOR + exe.getSystem() + CONST_SEPARATOR + exe.getEnvironment() + CONST_SEPARATOR + exe.getCountry() + CONST_SEPARATOR + exe.getApplication();144 String const03_key = TestCaseExecutionQueueToTreat.CONSTRAIN3_APPLICATION + CONST_SEPARATOR + exe.getApplication();145 String const04_key = TestCaseExecutionQueueToTreat.CONSTRAIN4_ROBOT + CONST_SEPARATOR + exe.getSelectedRobotHost();146 constrains_current.put(const02_key, exe.getPoolSizeAppEnvironment());147 constrains_current.put(const03_key, exe.getPoolSizeApplication());148 // Getting Robot Host PoolSize from invariant hashmap.149 int robot_poolsize_final = 0;150 if (!StringUtil.isNullOrEmpty(exe.getSelectedRobotHost())) {151 if (robot_poolsize.containsKey(exe.getSelectedRobotHost())) {152 robot_poolsize_final = ParameterParserUtil.parseIntegerParam(robot_poolsize.get(exe.getSelectedRobotHost()), poolSizeRobot);153 } else {154 robot_poolsize_final = poolSizeRobot;155 }156 }157 constrains_current.put(const04_key, robot_poolsize_final);158 }159 return constrains_current;160 }161 @Override162 public HashMap<String, Integer> getCurrentlyToTreat() throws CerberusException {163 AnswerList<TestCaseExecutionQueueToTreat> answer = new AnswerList<>();164 HashMap<String, Integer> constrains_current = new HashMap<String, Integer>();165 // Getting all executions to be treated.166 answer = tceiqService.readQueueToTreat();167 List<TestCaseExecutionQueueToTreat> executionsToTreat = answer.getDataList();168 // Calculate constrain values.169 for (TestCaseExecutionQueueToTreat exe : executionsToTreat) {170 String const01_key = TestCaseExecutionQueueToTreat.CONSTRAIN1_GLOBAL;171 String const02_key = TestCaseExecutionQueueToTreat.CONSTRAIN2_APPLIENV + CONST_SEPARATOR + exe.getSystem() + CONST_SEPARATOR + exe.getEnvironment() + CONST_SEPARATOR + exe.getCountry() + CONST_SEPARATOR + exe.getApplication();172 String const03_key = TestCaseExecutionQueueToTreat.CONSTRAIN3_APPLICATION + CONST_SEPARATOR + exe.getApplication();173 String const04_key = TestCaseExecutionQueueToTreat.CONSTRAIN4_ROBOT + CONST_SEPARATOR + exe.getQueueRobotHost();174 if (constrains_current.containsKey(const01_key)) {175 constrains_current.put(const01_key, constrains_current.get(const01_key) + 1);176 } else {177 constrains_current.put(const01_key, 1);178 }179 if (constrains_current.containsKey(const02_key)) {180 constrains_current.put(const02_key, constrains_current.get(const02_key) + 1);181 } else {182 constrains_current.put(const02_key, 1);183 }184 if (constrains_current.containsKey(const03_key)) {185 constrains_current.put(const03_key, constrains_current.get(const03_key) + 1);186 } else {187 constrains_current.put(const03_key, 1);188 }189 if (constrains_current.containsKey(const04_key)) {190 constrains_current.put(const04_key, constrains_current.get(const04_key) + 1);191 } else {192 constrains_current.put(const04_key, 1);193 }194 }195 return constrains_current;196 }197 /**198 * {@inheritDoc}199 */200 @Override201 public void executeNextInQueue(boolean forceExecution) throws CerberusException {202 if (!instanceActive) {203 LOG.warn("Queue execution disable on that JVM instance.");204 return;205 }206 // Job can be desactivated by parameter.207 if (!(parameterService.getParameterBooleanByKey("cerberus_queueexecution_enable", "", true))) {208 LOG.debug("Queue_Processing_Job disabled by parameter : 'cerberus_queueexecution_enable'.");209 return;210 }211 // We first check that another thread of Cerberus already trigger the job. Only 1 instance of the job is necessary.212 if (!(myVersionService.getMyVersionStringByKey("queueprocessingjobrunning", "N").equals("Y"))213 || forceExecution) {214 // Flag in database that job is already running.215 if (myVersionService.flagMyVersionString("queueprocessingjobrunning") || forceExecution) {216 // Saving the timestamps when the job start in database.217 myVersionService.updateMyVersionString("queueprocessingjobstart", String.valueOf(new Date()));218 if (forceExecution) {219 LOG.debug("Forcing Start of Queue_Processing_Job.");220 }221 int nbqueuedexe = 0;222 // We try to submit new jobs until the job does not trigger any new execution.223 // In Other Words : As long as the job trigger new execution, we execute it.224 do {225 if (!(parameterService.getParameterBooleanByKey("cerberus_queueexecution_enable", "", true))) {226 LOG.debug("Queue_Processing_Job disabled by parameter : 'cerberus_queueexecution_enable'.");227 return;228 }229 nbqueuedexe = 0;230 // Job is not already running, we can trigger it.231 LOG.debug("Starting Queue_Processing_Job.");232 // Getting all executions to be treated.233 AnswerList<TestCaseExecutionQueueToTreat> answer = new AnswerList<>();234 answer = tceiqService.readQueueToTreat();235 List<TestCaseExecutionQueueToTreat> executionsInQueue = answer.getDataList();236 int poolSizeGeneral = 12;237 int poolSizeRobot = 10;238 int queueTimeout = 600000;239 // Init constrain counter (from list of already running execution.).240 int const01_current = 0;241 int const02_current = 0;242 int const03_current = 0;243 int const04_current = 0;244 HashMap<String, Integer> constrains_current = new HashMap<>();245 HashMap<String, Integer> robothost_poolsize = new HashMap<>();246 HashMap<String, List<RobotExecutor>> robot_executor = new HashMap<>();247 HashMap<String, Robot> robot_header = new HashMap<>();248 if (!executionsInQueue.isEmpty()) {249 poolSizeGeneral = parameterService.getParameterIntegerByKey("cerberus_queueexecution_global_threadpoolsize", "", 12);250 poolSizeRobot = parameterService.getParameterIntegerByKey("cerberus_queueexecution_defaultrobothost_threadpoolsize", "", 10);251 queueTimeout = parameterService.getParameterIntegerByKey("cerberus_queueexecution_timeout", "", 600000);252 // Init constrain counter (from list of already running execution.).253 const01_current = 0;254 const02_current = 0;255 const03_current = 0;256 const04_current = 0;257 constrains_current = getCurrentlyRunning();258 LOG.debug("Current Constrains : " + constrains_current);259 // Getting RobotHost PoolSize260 robothost_poolsize = invariantService.readToHashMapGp1IntegerByIdname("ROBOTHOST", poolSizeRobot);261 // Getting the list of robot in scope of the queue entries. This is to avoid getting all robots from database.262 LOG.debug("Getting List of Robot Executor.");263 for (TestCaseExecutionQueueToTreat exe : executionsInQueue) {264 if (!StringUtil.isNullOrEmpty(exe.getQueueRobot())) {265 robot_executor.put(exe.getQueueRobot(), new ArrayList<>());266 }267 }268 LOG.debug("List of Robot from Queue entries : " + robot_executor);269 robot_executor = robotExecutorService.getExecutorListFromRobotHash(robot_executor);270 LOG.debug("Robot Executor List : " + robot_executor);271 LOG.debug("Getting List of Robot (Header).");272 List<String> listRobotS = new ArrayList<>();273 for (Map.Entry<String, List<RobotExecutor>> entry : robot_executor.entrySet()) {274 String key = entry.getKey();275 listRobotS.add(key);276 }277 robot_header = robotService.readToHashMapByRobotList(listRobotS);278 LOG.debug("Robot Header List : " + robot_header);279 }280 String robot = "";281 String robotExecutor = "";282 String robotHost = "";283 String robotPort = "";284 String appType = "";285 List<RobotExecutor> tmpExelist = new ArrayList<>();286 List<RobotExecutor> newTmpExelist = new ArrayList<>();287 // Analysing each execution in the database queue.288 for (TestCaseExecutionQueueToTreat exe : executionsInQueue) {289 LOG.debug("Starting analysing : " + exe.getId());290 String notTriggeredExeMessage = "";291 boolean triggerExe = false;292 robot = exe.getQueueRobot();293 // Getting here the list of possible executor sorted by prio.294 List<RobotExecutor> exelist = new ArrayList<>();295 appType = exe.getAppType();296 if ((appType.equals(Application.TYPE_APK)) || (appType.equals(Application.TYPE_GUI)) || (appType.equals(Application.TYPE_FAT)) || (appType.equals(Application.TYPE_IPA))) {297 // Application require a robot so we can get the list of executors.298 if (StringUtil.isNullOrEmpty(robot)) {299 exelist = new ArrayList<>();300 exelist.add(factoryRobotExecutor.create(0, "", "", "Y", 1, exe.getQueueRobotHost(), exe.getQueueRobotPort(), "", "", "", "", null, "", 0, "", 0, "", "", "", null, "", null));301 } else {302 exelist = robot_executor.get(robot);303 if (exelist == null || exelist.size() < 1) {304 exelist = new ArrayList<>();305 exelist.add(factoryRobotExecutor.create(0, "", "", "Y", 1, "", "", "", "", "", "", null, "", 0, "", 0, "", "", "", null, "", null));306 }307 }308 } else {309 // Application does not require a robot so we create a fake one with empty data.310 exelist = new ArrayList<>();311 exelist.add(factoryRobotExecutor.create(0, "", "", "Y", 1, "", "", "", "", "", "", null, "", 0, "", 0, "", "", "", null, "", null));312 }313 // Looping other every potential executor on the corresponding robot.314 for (RobotExecutor robotExecutor1 : exelist) {315 robotHost = robotExecutor1.getHost();316 robotPort = robotExecutor1.getPort();317 robotExecutor = robotExecutor1.getExecutor();318 LOG.debug("Trying with : " + robotHost + " Port : " + robotPort + " From Robot/Executor : " + robotExecutor1.getRobot() + "/" + robotExecutor1.getExecutor());319 // RobotHost PoolSize if retreived from invariant hashmap.320 int robothost_poolsize_final = 0;321 if (!StringUtil.isNullOrEmpty(robotHost)) {322 if (robothost_poolsize.containsKey(robotHost)) {323 robothost_poolsize_final = ParameterParserUtil.parseIntegerParam(robothost_poolsize.get(robotHost), poolSizeRobot);324 } else {325 robothost_poolsize_final = poolSizeRobot;326 }327 }328 LOG.debug("Pool Values : poolGen " + poolSizeGeneral + " poolApp " + exe.getPoolSizeAppEnvironment() + " poolRobotHost " + robothost_poolsize_final);329 String const01_key = TestCaseExecutionQueueToTreat.CONSTRAIN1_GLOBAL;330 String const02_key = TestCaseExecutionQueueToTreat.CONSTRAIN2_APPLIENV + CONST_SEPARATOR + exe.getSystem() + CONST_SEPARATOR + exe.getEnvironment() + CONST_SEPARATOR + exe.getCountry() + CONST_SEPARATOR + exe.getApplication();331 String const03_key = TestCaseExecutionQueueToTreat.CONSTRAIN3_APPLICATION + CONST_SEPARATOR + exe.getApplication();332 String const04_key = TestCaseExecutionQueueToTreat.CONSTRAIN4_ROBOT + CONST_SEPARATOR + robotHost;333 // Eval Constrain 1334 if (constrains_current.containsKey(const01_key)) {335 const01_current = constrains_current.get(const01_key);336 } else {337 const01_current = 0;338 }339 // Eval Constrain 1340 boolean constMatch01;341 if (poolSizeGeneral == 0) {342 // if poolsize == 0, this means no constrain specified.343 constMatch01 = false;344 } else {345 constMatch01 = (const01_current >= poolSizeGeneral);346 }347 // Eval Constrain 2348 if (constrains_current.containsKey(const02_key)) {349 const02_current = constrains_current.get(const02_key);350 } else {351 const02_current = 0;352 }353 // Eval Constrain 2354 boolean constMatch02;355 if (exe.getPoolSizeAppEnvironment() == 0) {356 // if poolsize == 0, this means no constrain specified.357 constMatch02 = false;358 } else {359 constMatch02 = (const02_current >= exe.getPoolSizeAppEnvironment());360 }361 // Eval Constrain 3362 if (constrains_current.containsKey(const03_key)) {363 const03_current = constrains_current.get(const03_key);364 } else {365 const03_current = 0;366 }367 // Eval Constrain 3368 boolean constMatch03;369 if (exe.getPoolSizeApplication() == 0) {370 // if poolsize == 0, this means no constrain specified.371 constMatch03 = false;372 } else {373 constMatch03 = (const03_current >= exe.getPoolSizeApplication());374 }375 // Eval Constrain 4376 if (constrains_current.containsKey(const04_key)) {377 const04_current = constrains_current.get(const04_key);378 } else {379 const04_current = 0;380 }381 // Eval Constrain 4382 boolean constMatch04;383 if (robothost_poolsize_final == 0) {384 // if poolsize == 0, this means no constrain specified.385 constMatch04 = false;386 } else {387 constMatch04 = (const04_current >= robothost_poolsize_final);388 }389 if ((!constMatch01 && !constMatch02 && !constMatch03 && !constMatch04)390 || (!constMatch01 && exe.getManualExecution().equals("Y"))) {391 // None of the constrains match or exe is manual so we can trigger the execution.392 // Execution could already been triggered on a different executor.393 if (triggerExe == false) {394 // Adding execution to queue.395 if (queueService.updateToWaiting(exe.getId())) {396 try {397 ExecutionQueueWorkerThread task = new ExecutionQueueWorkerThread();398 // Flag on database that execution has been selected.399 robotExecutorService.updateLastExe(robot, robotExecutor);400 // Update robot_executor HasMap for next queued executions in the current batch. If Algo is based on Ranking, nothing needs to be changed.401 if ((robot_header.get(robot) != null)402 && (Robot.LOADBALANCINGEXECUTORMETHOD_ROUNDROBIN.equals(robot_header.get(robot).getLbexemethod()))403 && (exelist.size() > 1)) {404 tmpExelist = robot_executor.get(robot);405 newTmpExelist = new ArrayList<>();406 RobotExecutor lastRobotExecutor = null;407 for (RobotExecutor robotExecutor2 : tmpExelist) {408 // Update new List with RobotExecutor.LOADBALANCINGMETHOD_ROUNDROBIN Algo puting the Executor that has just been inserted at the end.409 if (robotExecutor2.getExecutor().equals(robotExecutor)) {410 lastRobotExecutor = robotExecutor2;411 } else {412 newTmpExelist.add(robotExecutor2);413 }414 }415 newTmpExelist.add(lastRobotExecutor);416 robot_executor.put(robot, newTmpExelist);417 }418 task.setCerberusExecutionUrl(parameterService.getParameterStringByKey("cerberus_url", exe.getSystem(), ""));419 task.setQueueId(exe.getId());420 task.setRobotExecutor(robotExecutor);421 task.setSelectedRobotHost(robotHost);422 task.setToExecuteTimeout(queueTimeout);423 task.setQueueService(queueService);424 task.setQueueDepService(queueDepService);425 task.setRetriesService(retriesService);426 task.setExecThreadPool(threadQueuePool);427 Future<?> future = threadQueuePool.getExecutor().submit(task);428 task.setFuture(future);429 triggerExe = true;430 nbqueuedexe++;431 // Debug messages.432 LOG.debug("RESULT : Execution triggered. Const1 " + constMatch01 + " Const2 " + constMatch02 + " Const3 " + constMatch03 + " Const4 " + constMatch04 + " Manual " + exe.getManualExecution());433 LOG.debug(" CurConst1 " + const01_current + " CurConst2 " + const02_current + " CurConst3 " + const03_current + " CurConst4 " + const04_current);434 // Constrains Counter increase435 constrains_current.put(const01_key, const01_current + 1);436 if (!exe.getManualExecution().equals("Y")) {437 // Specific increment only if automatic execution.438 constrains_current.put(const02_key, const02_current + 1);439 constrains_current.put(const03_key, const03_current + 1);440 constrains_current.put(const04_key, const04_current + 1);441 }442 } catch (Exception e) {443 LOG.error("Failed to add Queueid : " + exe.getId() + " into the queue : " + e.getMessage(), e);444 }445 }446 } else {447 LOG.debug("RESULT : Execution Not triggered. Queueid : " + exe.getId() + " already inserted (on a previous Executor).");448 }449 } else {450 if (constMatch04) {451 notTriggeredExeMessage += "Robot Host contrain on '" + const04_key + "' reached. " + robothost_poolsize_final + " Execution(s) already in pool. ";452 }453 if (constMatch03) {454 notTriggeredExeMessage += "Application contrain on '" + const03_key + "' reached . " + exe.getPoolSizeApplication() + " Execution(s) already in pool. ";455 }456 if (constMatch02) {457 notTriggeredExeMessage += "Application Environment contrain on '" + const02_key + "' reached . " + exe.getPoolSizeAppEnvironment() + " Execution(s) already in pool. ";458 }459 if (constMatch01) {460 notTriggeredExeMessage += "Global contrain reached. " + poolSizeGeneral + " Execution(s) already in pool. ";461 }462 LOG.debug("RESULT : Execution not triggered. Const1 " + constMatch01 + " Const2 " + constMatch02 + " Const3 " + constMatch03 + " Const4 " + constMatch04 + " Manual " + exe.getManualExecution());463 LOG.debug(" CurConst1 " + const01_current + " CurConst2 " + const02_current + " CurConst3 " + const03_current + " CurConst4 " + const04_current);464 }465 }466// End of Queue entry analysis accross all Executors.467 if ((exe.getDebugFlag() != null) && (exe.getDebugFlag().equalsIgnoreCase("Y"))) {468 if (triggerExe == false) {469 queueService.updateComment(exe.getId(), notTriggeredExeMessage);470 }471 LOG.debug("Debug Message : " + notTriggeredExeMessage);472 }473 }474 LOG.debug("Stopping Queue_Processing_Job - TOTAL Released execution(s) : " + nbqueuedexe);475 } while (nbqueuedexe > 0);476 } else {477 LOG.debug("Queue_Processing_Job not triggered (already running when updating.)");478 }479 // Flag in database that job is finished.480 myVersionService.updateMyVersionString("queueprocessingjobrunning", "N");481 } else {482 LOG.debug("Queue_Processing_Job not triggered (already running.)");483 }484 }485 /**486 * {@inheritDoc}487 */488 @Override489 @Async490 public void executeNextInQueueAsynchroneously(boolean forceExecution) throws CerberusException {491 this.executeNextInQueue(forceExecution);492 }493}...

Full Screen

Full Screen

getID

Using AI Code Generation

copy

Full Screen

1import org.cerberus.crud.entity.RobotExecutor;2import org.cerberus.crud.entity.RobotExecutor;3import org.cerberus.crud.entity.RobotExecutor;4public class MyRobotExecutor extends RobotExecutor {5 public MyRobotExecutor() {6 super();7 }8 public MyRobotExecutor(String id) {9 super(id);10 }11 public MyRobotExecutor(String id, String host, String port, String platform, String browser, String version, String active, String description, String usrCreated, Date dateCreated, String usrModif, Date dateModif) {12 super(id, host, port, platform, browser, version, active, description, usrCreated, dateCreated, usrModif, dateModif);13 }14 public String getID() {15 return super.getID();16 }17}

Full Screen

Full Screen

getID

Using AI Code Generation

copy

Full Screen

1String id = robotExecutor.getId();2String id = robotExecutor.getID();3String id = robotExecutor.getId();4String id = robotExecutor.getID();5String id = robotExecutor.getId();6String id = robotExecutor.getID();7String id = robotExecutor.getId();8String id = robotExecutor.getID();9String id = robotExecutor.getId();10String id = robotExecutor.getID();11String id = robotExecutor.getId();12String id = robotExecutor.getID();13String id = robotExecutor.getId();14String id = robotExecutor.getID();15String id = robotExecutor.getId();16String id = robotExecutor.getID();

Full Screen

Full Screen

getID

Using AI Code Generation

copy

Full Screen

1robotExecutorID = robotExecutor.getID();2if (robotExecutorID != null) {3} else {4}5robotExecutorID = robotExecutor.getID();6if (robotExecutorID != null) {7} else {8}9robotExecutorID = robotExecutor.getID();10if (robotExecutorID != null) {11} else {12}13robotExecutorID = robotExecutor.getID();14if (robotExecutorID != null) {15} else {16}17robotExecutorID = robotExecutor.getID();18if (robotExecutorID != null) {19} else {20}

Full Screen

Full Screen

getID

Using AI Code Generation

copy

Full Screen

1def robotExecutor = robotExecutorService.findRobotExecutorByKey("robotExecutor1");2println("Robot Executor: " + robotExecutor);3println("Robot Name: " + robotExecutor.getRobot());4println("Robot Host: " + robotExecutor.getHost());5def robotExecutorId = robotExecutor.getId();6println("Robot Executor Id: " + robotExecutorId);7def robotExecutor2 = robotExecutorService.findRobotExecutorByKey(robotExecutorId);8println("Robot Executor 2: " + robotExecutor2);9println("Robot Name: " + robotExecutor2.getRobot());10println("Robot Host: " + robotExecutor2.getHost());11def robotExecutor3 = robotExecutorService.getRobotExecutorByKey(robotExecutorId);12println("Robot Executor 3: " + robotExecutor3);13println("Robot Name: " + robotExecutor3.getRobot());14println("Robot Host: " + robotExecutor3.getHost());15def robotExecutor4 = robotExecutorService.getRobotExecutorByKey("robotExecutor1");16println("Robot Executor 4: " + robotExecutor4);17println("Robot Name: " + robotExecutor4.getRobot());18println("Robot Host: " + robotExecutor4.getHost());19def robotExecutor5 = robotExecutorService.getRobotExecutorByKey("robotExecutor1");20println("Robot Executor 5: " + robotExecutor5);21println("Robot Name: " + robotExecutor5.getRobot());22println("Robot Host: " + robotExecutor5.getHost());23def robotExecutor6 = robotExecutorService.getRobotExecutorByKey("robotExecutor1");24println("Robot Executor 6: " + robotExecutor6);25println("Robot Name: " + robotExecutor6

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