runRequest.setParameters(runRequest.getParameters()); // This will validate parameters.
public Integer run(JqmBaseTest test) { int nbExpected = expectedNonOk + expectedOk; for (String nodeName : nodeNames) { test.addAndStartEngine(nodeName); } Integer i = JobRequest.create("TestJqmApplication", "TestUser").setSessionID(sessionId).setParameters(runtimePrms).submit(); TestHelpers.waitFor(nbExpected, 9000 + waitMarginMs + nbExpected * 2000, cnx); if (waitMsMin > 0) { try { Thread.sleep(waitMsMin); } catch (InterruptedException e) { // not an issue during tests. } } Assert.assertEquals(expectedOk, TestHelpers.getOkCount(cnx)); Assert.assertEquals(expectedNonOk, TestHelpers.getNonOkCount(cnx)); return i; } }
@Override public Integer enqueue(String applicationName, String user, String mail, String sessionId, String application, String module, String keyword1, String keyword2, String keyword3, Map<String, String> parameters) { JobRequest jr = new JobRequest(applicationName, user, mail); jr.setApplicationName(applicationName); jr.setUser(user == null ? ji.getUserName() : user); jr.setEmail(mail); jr.setSessionID(sessionId == null ? this.ji.getSessionID() : sessionId); jr.setApplication(application == null ? this.ji.getJD().getApplication() : application); jr.setModule(module == null ? this.ji.getJD().getModule() : module); jr.setKeyword1(keyword1); jr.setKeyword2(keyword2); jr.setKeyword3(keyword3); jr.setParentID(this.ji.getId()); if (parameters != null) { jr.setParameters(parameters); } return getJqmClient().enqueue(jr); }
@Override public Integer enqueue(String applicationName, String user, String mail, String sessionId, String application, String module, String keyword1, String keyword2, String keyword3, Map<String, String> parameters) { JobRequest jr = new JobRequest(applicationName, user, mail); jr.setApplicationName(applicationName); jr.setUser(user == null ? ji.getUserName() : user); jr.setEmail(mail); jr.setSessionID(sessionId == null ? this.ji.getSessionID() : sessionId); jr.setApplication(application == null ? this.ji.getJD().getApplication() : application); jr.setModule(module == null ? this.ji.getJD().getModule() : module); jr.setKeyword1(keyword1); jr.setKeyword2(keyword2); jr.setKeyword3(keyword3); jr.setParentID(this.ji.getId()); if (parameters != null) { jr.setParameters(parameters); } return getJqmClient().enqueue(jr); }