Merge branch 'JABAWS_Release_2_0'
[jabaws.git] / testsrc / compbio / runner / _impl / MclTester.java
diff --git a/testsrc/compbio/runner/_impl/MclTester.java b/testsrc/compbio/runner/_impl/MclTester.java
deleted file mode 100644 (file)
index 7d58e08..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Copyright (c) 2009 Peter Troshin\r
- *  \r
- *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0     \r
- * \r
- *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
- *  Apache License version 2 as published by the Apache Software Foundation\r
- * \r
- *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
- *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
- *  License for more details.\r
- * \r
- *  A copy of the license is in apache_license.txt. It is also available here:\r
- * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
- * \r
- * Any republication or derived work distributed in source code form\r
- * must include this copyright and license notice.\r
- */\r
-package compbio.runner._impl;\r
-\r
-import static org.testng.AssertJUnit.assertEquals;\r
-import static org.testng.AssertJUnit.assertFalse;\r
-import static org.testng.AssertJUnit.assertNotNull;\r
-import static org.testng.AssertJUnit.assertTrue;\r
-import static org.testng.AssertJUnit.fail;\r
-\r
-import java.text.ParseException;\r
-\r
-import org.ggf.drmaa.DrmaaException;\r
-import org.ggf.drmaa.JobInfo;\r
-import org.testng.annotations.Test;\r
-\r
-import compbio.engine.cluster.drmaa.ClusterUtil;\r
-import compbio.engine.cluster.drmaa.JobRunner;\r
-import compbio.engine.cluster.drmaa.StatisticManager;\r
-import compbio.metadata.AllTestSuit;\r
-import compbio.metadata.JobExecutionException;\r
-import compbio.metadata.JobStatus;\r
-import compbio.metadata.JobSubmissionException;\r
-\r
-public class MclTester {\r
-\r
-       public static String test_input = "/homes/pvtroshin/mclReady_E-TABM-145_CorDesc-10_Spearman.txt";\r
-       public static String test_outfile = "/homes/pvtroshin/MCL-E-TABM-145_25-06-2009.txt";\r
-\r
-       @Test()\r
-       public void testGetTestCommand() {\r
-               System.out.println(Mcl.getTestCommand());\r
-       }\r
-\r
-       @Test(enabled = false, groups = { AllTestSuit.test_group_cluster,\r
-                       AllTestSuit.test_group_runner })\r
-       public void testBuildCommand() {\r
-               Mcl mcl = new Mcl(AllTestSuit.OUTPUT_DIR_ABSOLUTE);\r
-               // TODO mcl.setInput(test_input).setOutput(test_outfile);\r
-               // mcl.setParameters(Mcl.getTestParams());\r
-\r
-               try {\r
-                       JobRunner runner = JobRunner.getInstance(null);\r
-                       assertNotNull("Runner is NULL", runner);\r
-                       runner.executeJob();\r
-                       // assertNotNull("JobId is NULL", jobId1);\r
-                       JobStatus status = runner.getJobStatus();\r
-                       assertTrue("Session state is wrong", status == JobStatus.PENDING\r
-                                       || status == JobStatus.RUNNING);\r
-                       JobInfo info = runner.getJobInfo();\r
-                       assertNotNull("JobInfo is null", info);\r
-                       StatisticManager sm = new StatisticManager(info);\r
-                       assertNotNull("StatisticManager is null", sm);\r
-                       try {\r
-                               String time_s = sm.getCalculationTime();\r
-                               assertNotNull("Calculation time is null", time_s);\r
-                               String exits = sm.getExitStatus();\r
-                               assertNotNull("Exit status is null", exits);\r
-                               int exitsInt = ClusterUtil.CLUSTER_STAT_IN_SEC.parse(exits)\r
-                                               .intValue();\r
-                               assertEquals("Exist status is not 0", 0, exitsInt);\r
-                               System.out.println(sm.getAllStats());\r
-\r
-                       } catch (ParseException e) {\r
-                               e.printStackTrace();\r
-                               fail("Parse Exception: " + e.getLocalizedMessage());\r
-                       }\r
-\r
-                       assertTrue("Process exited:", sm.hasExited());\r
-                       assertFalse("Process aborted:", sm.wasAborted());\r
-                       assertFalse("Process hasdump:", sm.hasDump());\r
-                       assertFalse("Process signaled:", sm.hasSignaled());\r
-\r
-               } catch (DrmaaException e) {\r
-                       e.printStackTrace();\r
-                       fail(e.getLocalizedMessage());\r
-               } catch (JobSubmissionException e) {\r
-                       e.printStackTrace();\r
-                       fail(e.getLocalizedMessage());\r
-               } catch (JobExecutionException e) {\r
-                       e.printStackTrace();\r
-                       fail(e.getLocalizedMessage());\r
-               }\r
-       }\r
-\r
-}\r