- /**\r
- * This tests fails from time to time depending on the cluster load or some\r
- * other factors. Any client code has to adjust for this issue\r
- */\r
- @Test(groups = { AllTestSuit.test_group_cluster,\r
- AllTestSuit.test_group_runner })\r
- public void testRunOnClusterAsync() {\r
- assertFalse(SysPrefs.isWindows,\r
- "Cluster execution can only be in unix environment");\r
- try {\r
- ConfiguredExecutable<Disembl> confDisembl = Configurator\r
- .configureExecutable(disembl,\r
- Executable.ExecProvider.Cluster);\r
- AsyncExecutor aengine = Configurator.getAsyncEngine(confDisembl);\r
- String jobId = aengine.submitJob(confDisembl);\r
- assertNotNull(jobId, "Runner is NULL");\r
- // let drmaa to start\r
- Thread.sleep(500);\r
- JobStatus status = aengine.getJobStatus(jobId);\r
- while (status != JobStatus.FINISHED) {\r
- System.out.println("Job Status: " + status);\r
- Thread.sleep(1000);\r
- status = aengine.getJobStatus(jobId);\r
- ConfiguredExecutable<Jronn> result = (ConfiguredExecutable<Jronn>) aengine\r
- .getResults(jobId);\r
- assertNotNull(result);\r
- System.out.println("RES:" + result);\r
- // Some times the job could be removed from the cluster accounting \r
- // before it has been reported to finish. Make sure \r
- // to stop waiting in such case\r
- if (status == JobStatus.UNDEFINED) {\r
- break;\r
+ /**\r
+ * This tests fails from time to time depending on the cluster load or some\r
+ * other factors. Any client code has to adjust for this issue\r
+ */\r
+ @Test(groups = {AllTestSuit.test_group_cluster,\r
+ AllTestSuit.test_group_runner})\r
+ public void testRunOnClusterAsync() {\r
+ assertFalse(SysPrefs.isWindows,\r
+ "Cluster execution can only be in unix environment");\r
+ try {\r
+ ConfiguredExecutable<Disembl> confDisembl = Configurator\r
+ .configureExecutable(disembl,\r
+ Executable.ExecProvider.Cluster);\r
+ AsyncExecutor aengine = Configurator.getAsyncEngine(confDisembl);\r
+ String jobId = aengine.submitJob(confDisembl);\r
+ assertNotNull(jobId, "Runner is NULL");\r
+ // let drmaa to start\r
+ Thread.sleep(500);\r
+ JobStatus status = aengine.getJobStatus(jobId);\r
+ while (status != JobStatus.FINISHED) {\r
+ System.out.println("Job Status: " + status);\r
+ Thread.sleep(1000);\r
+ status = aengine.getJobStatus(jobId);\r
+ ConfiguredExecutable<Jronn> result = (ConfiguredExecutable<Jronn>) aengine\r
+ .getResults(jobId);\r
+ assertNotNull(result);\r
+ System.out.println("RES:" + result);\r
+ // Some times the job could be removed from the cluster\r
+ // accounting\r
+ // before it has been reported to finish. Make sure\r
+ // to stop waiting in such case\r
+ if (status == JobStatus.UNDEFINED) {\r
+ break;\r
+ }\r
+ }\r
+ } catch (JobSubmissionException e) {\r
+ e.printStackTrace();\r
+ fail("DrmaaException caught:" + e.getMessage());\r
+ } catch (InterruptedException e) {\r
+ e.printStackTrace();\r
+ fail(e.getMessage());\r
+ } catch (ResultNotAvailableException e) {\r
+ e.printStackTrace();\r
+ fail(e.getMessage());\r