Parameters Tester updated. Untested webservice code. generate xsd/wsdl?
[jabaws.git] / testsrc / compbio / runner / conservation / AAConTester.java
index fbb9720..353509a 100644 (file)
@@ -29,6 +29,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;\r
 import java.text.ParseException;\r
 import java.util.Arrays;\r
+import java.util.HashSet;\r
 \r
 import javax.xml.bind.ValidationException;\r
 \r
@@ -37,8 +38,8 @@ import org.ggf.drmaa.JobInfo;
 import org.testng.annotations.BeforeMethod;\r
 import org.testng.annotations.Test;\r
 \r
-import compbio.conservation.Method;\r
-import compbio.data.sequence.MultiAnnotatedSequence;\r
+import compbio.data.sequence.Score;\r
+import compbio.data.sequence.ScoreManager;\r
 import compbio.engine.AsyncExecutor;\r
 import compbio.engine.Configurator;\r
 import compbio.engine.FilePuller;\r
@@ -51,6 +52,7 @@ import compbio.engine.cluster.drmaa.ClusterUtil;
 import compbio.engine.cluster.drmaa.JobRunner;\r
 import compbio.engine.cluster.drmaa.StatisticManager;\r
 import compbio.engine.local.LocalRunner;\r
+import compbio.metadata.AllTestSuit;\r
 import compbio.metadata.ChunkHolder;\r
 import compbio.metadata.JobExecutionException;\r
 import compbio.metadata.JobStatus;\r
@@ -80,7 +82,7 @@ public class AAConTester {
                aacon.setInput(test_alignment_input).setOutput(test_outfile);\r
        }\r
 \r
-       @Test()\r
+       @Test(groups = {AllTestSuit.test_group_runner})\r
        public void testRunOnCluster() {\r
                assertFalse(SysPrefs.isWindows,\r
                                "Cluster execution can only be in unix environment");\r
@@ -136,7 +138,7 @@ public class AAConTester {
         * 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()\r
+       @Test(groups = {AllTestSuit.test_group_runner, AllTestSuit.test_group_cluster})\r
        public void testRunOnClusterAsync() {\r
                assertFalse(SysPrefs.isWindows,\r
                                "Cluster execution can only be in unix environment");\r
@@ -177,7 +179,7 @@ public class AAConTester {
                }\r
        }\r
 \r
-       @Test()\r
+       @Test(groups = {AllTestSuit.test_group_runner})\r
        public void testRunLocally() {\r
                try {\r
                        ConfiguredExecutable<AACon> confAAcon = Configurator\r
@@ -188,9 +190,9 @@ public class AAConTester {
                        lr.executeJob();\r
                        ConfiguredExecutable<?> al1 = lr.waitForResult();\r
                        assertNotNull(al1.getResults());\r
-                       MultiAnnotatedSequence<Method> annotations = confAAcon.getResults();\r
+                       ScoreManager annotations = confAAcon.getResults();\r
                        assertNotNull(annotations);\r
-                       assertEquals(annotations.getAnnotations().size(), 1);\r
+                       assertEquals(annotations.asSet().size(), 18);\r
                        assertEquals(al1.getResults(), annotations);\r
                } catch (JobSubmissionException e) {\r
                        e.printStackTrace();\r
@@ -204,7 +206,7 @@ public class AAConTester {
                }\r
        }\r
 \r
-       @Test()\r
+       @Test(groups = {AllTestSuit.test_group_runner})\r
        public void testRunLocallyWithPreset() {\r
                try {\r
                        PresetManager<AACon> aaconPresets = Util.getPresets(AACon.class);\r
@@ -219,9 +221,9 @@ public class AAConTester {
                        lr.executeJob();\r
                        ConfiguredExecutable<?> al1 = lr.waitForResult();\r
                        assertNotNull(al1.getResults());\r
-                       MultiAnnotatedSequence<Method> annotations = confAAcon.getResults();\r
+                       ScoreManager annotations = confAAcon.getResults();\r
                        assertNotNull(annotations);\r
-                       assertEquals(annotations.getAnnotations().size(), 13);\r
+                       assertEquals(annotations.asSet().size(), 13);\r
                        assertEquals(al1.getResults(), annotations);\r
                } catch (JobSubmissionException e) {\r
                        e.printStackTrace();\r
@@ -235,7 +237,7 @@ public class AAConTester {
                }\r
        }\r
 \r
-       @Test()\r
+       @Test(groups = {AllTestSuit.test_group_runner})\r
        public void testRunLocallyOnTwoCpu() {\r
                try {\r
                        aacon = new AACon();\r
@@ -252,10 +254,11 @@ public class AAConTester {
                        lr.executeJob();\r
                        ConfiguredExecutable<?> al1 = lr.waitForResult();\r
                        assertNotNull(al1.getResults());\r
-                       MultiAnnotatedSequence<Method> annotations = confAAcon.getResults();\r
+                       ScoreManager annotations = confAAcon.getResults();\r
                        assertNotNull(annotations);\r
-                       assertEquals(annotations.getAnnotations().size(), 3);\r
+                       assertEquals(annotations.asSet().size(), 3);\r
                        assertEquals(al1.getResults(), annotations);\r
+\r
                } catch (JobSubmissionException e) {\r
                        e.printStackTrace();\r
                        fail(e.getLocalizedMessage());\r
@@ -267,7 +270,8 @@ public class AAConTester {
                        fail(e.getLocalizedMessage());\r
                }\r
        }\r
-       @Test()\r
+       \r
+       @Test(groups = {AllTestSuit.test_group_runner})\r
        public void readStatistics() {\r
                try {\r
                        ConfiguredExecutable<AACon> confAAcon = Configurator\r
@@ -317,7 +321,7 @@ public class AAConTester {
                }\r
        }\r
 \r
-       @Test()\r
+       @Test(groups = {AllTestSuit.test_group_runner})\r
        public void testPersistance() {\r
                try {\r
                        AACon aacon = new AACon();\r
@@ -385,7 +389,7 @@ public class AAConTester {
                }\r
        }\r
 \r
-       @Test()\r
+       @Test(groups = {AllTestSuit.test_group_runner})\r
        public void testConfigurationLoading() {\r
                try {\r
                        RunnerConfig<AACon> aaconConfig = ConfExecutable\r