public void run() { try { this.session.init(contact); System.out.println("Session Init success"); this.session.init(contact); System.out.println("Session Init success"); System.out.println("drmaa_init() failed: Test " + this.type + " failed"); this.session.exit(); } catch (AlreadyActiveSessionException e) { System.out.println("Succesfully finished test " + this.type); } catch (DrmaaException e) { System.err.println("drmaa_init() failed: Test " + this.type + " failed"); e.printStackTrace(); this.stateAllTest = false; } try { this.session.exit(); } catch (DrmaaException e) { System.err.println("drmaa_exit() failed"); e.printStackTrace(); this.stateAllTest = false; } }
/** * Tear down of test. * * @throws DrmaaException */ public void tearDown() throws DrmaaException { /* the system should be stable enough to call exit() twice */ try { session.exit(); } catch (NoActiveSessionException ex) { // this exception is expected } catch (DrmaaException ex) { ex.printStackTrace(); } }
public void test2882Test() throws DrmaaException { System.out.println("testIssue2882"); /* call the underlaying japi_exit() before japi_init() */ try { session.exit(); } catch (NoActiveSessionException ex) { // this exception is expected } catch (DrmaaException ex) { ex.printStackTrace(); } }
public void run() { Set attributes; Iterator attrIterator; this.createJob = new CreateSleeperJobTemplate(this.session, this.executable, "5", false); try { this.session.init(null); System.out.println("Session Init success"); this.jt = this.createJob.getJobTemplate(); attributes = this.jt.getAttributeNames(); attrIterator = attributes.iterator(); while (attrIterator.hasNext()) { String attr = (String) attrIterator.next(); System.out.println(attr); } System.out.println("Succesfully finished test " + this.type); } catch (Exception e) { System.err.println("Test " + this.type + " failed"); e.printStackTrace(); this.stateAllTest = false; } try { this.session.exit(); } catch (DrmaaException e) { System.err.println("drmaa_exit() failed"); e.printStackTrace(); this.stateAllTest = false; } }
public void run() { int n = 20; this.createJob = new CreateSleeperJobTemplate(this.session, this.executable, "5", false); try { this.session.init(contact); System.out.println("Session Init success"); this.jt = this.createJob.getJobTemplate(); for (int i = 0; i < n; i++) { this.id = this.session.runJob(this.jt); System.out.println("Job successfully submitted ID: " + this.id); } for (int i = 0; i < n; i++) { JobInfo info = this.session.wait(Session.JOB_IDS_SESSION_ANY, Session.TIMEOUT_WAIT_FOREVER); } System.out.println("Succesfully finished test " + this.type); } catch (Exception e) { System.err.println("Test " + this.type + " failed"); e.printStackTrace(); this.stateAllTest = false; } try { this.session.exit(); } catch (DrmaaException e) { System.err.println("drmaa_exit() failed"); e.printStackTrace(); this.stateAllTest = false; } }