X-Git-Url: http://source.jalview.org/gitweb/?p=jabaws.git;a=blobdiff_plain;f=testsrc%2Fcompbio%2Frunner%2F_impl%2FTmhmm2Tester.java;fp=testsrc%2Fcompbio%2Frunner%2F_impl%2FTmhmm2Tester.java;h=0000000000000000000000000000000000000000;hp=fe920482bfbe9026cca637ce90b7e1767d4a3637;hb=a6f4c70ca7af2302c60217480a534a9ac2320acb;hpb=bea86782341eb4d30559dea2857dace7f9f3a313 diff --git a/testsrc/compbio/runner/_impl/Tmhmm2Tester.java b/testsrc/compbio/runner/_impl/Tmhmm2Tester.java deleted file mode 100644 index fe92048..0000000 --- a/testsrc/compbio/runner/_impl/Tmhmm2Tester.java +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (c) 2009 Peter Troshin - * - * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 1.0 - * - * This library is free software; you can redistribute it and/or modify it under the terms of the - * Apache License version 2 as published by the Apache Software Foundation - * - * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache - * License for more details. - * - * A copy of the license is in apache_license.txt. It is also available here: - * @see: http://www.apache.org/licenses/LICENSE-2.0.txt - * - * Any republication or derived work distributed in source code form - * must include this copyright and license notice. - */ -package compbio.runner._impl; - -import static org.testng.AssertJUnit.assertFalse; -import static org.testng.AssertJUnit.assertNotNull; -import static org.testng.AssertJUnit.assertTrue; -import static org.testng.AssertJUnit.fail; - -import java.text.ParseException; - -import org.ggf.drmaa.DrmaaException; -import org.ggf.drmaa.JobInfo; -import org.testng.annotations.Test; - -import compbio.engine.cluster.drmaa.ClusterUtil; -import compbio.engine.cluster.drmaa.JobRunner; -import compbio.engine.cluster.drmaa.StatisticManager; -import compbio.metadata.AllTestSuit; -import compbio.metadata.JobExecutionException; -import compbio.metadata.JobStatus; -import compbio.metadata.JobSubmissionException; - -public class Tmhmm2Tester { - - public static String test_input = "/homes/pvtroshin/TO1381.fasta"; - public static String test_outfile = "/homes/pvtroshin/TO1381.tmhmm2.out"; - public static String test_outDir = "/homes/pvtroshin/HMM2"; - - @Test - public void testGetTestCommand() { - System.out.println(Tmhmm2.getTestCommand()); - } - - @Test(enabled = false, groups = { AllTestSuit.test_group_cluster, - AllTestSuit.test_group_runner }) - public void testBuildCommand() { - Tmhmm2 hmm = new Tmhmm2(AllTestSuit.OUTPUT_DIR_ABSOLUTE); - // TODO hmm.setInput(test_input).setOutput(test_outfile); - // hmm.setParameters(new Tmhmm2().getParameters()); - - try { - JobRunner runner = JobRunner.getInstance(null); - assertNotNull("Runner is NULL", runner); - // runner.setWorkDirectory(test_outDir); - runner.executeJob(); - // assertNotNull(jobId1); - JobStatus status = runner.getJobStatus(); - assertTrue(status == JobStatus.PENDING - || status == JobStatus.RUNNING); - JobInfo info = runner.getJobInfo(); - assertNotNull(info); - StatisticManager sm = new StatisticManager(info); - assertNotNull(sm); - try { - String exits = sm.getExitStatus(); - assertNotNull(exits); - int exitsInt = ClusterUtil.CLUSTER_STAT_IN_SEC.parse(exits) - .intValue(); - // assertEquals(0, exitsInt); - System.out.println(sm.getAllStats()); - - } catch (ParseException e) { - e.printStackTrace(); - fail("Parse Exception: " + e.getLocalizedMessage()); - } - - assertTrue(sm.hasExited()); - assertFalse(sm.wasAborted()); - assertFalse(sm.hasDump()); - assertFalse(sm.hasSignaled()); - - } catch (DrmaaException e) { - e.printStackTrace(); - fail(e.getLocalizedMessage()); - } catch (JobSubmissionException e) { - e.printStackTrace(); - fail(e.getLocalizedMessage()); - } catch (JobExecutionException e) { - e.printStackTrace(); - fail(e.getLocalizedMessage()); - } - } - -}