From d188897e153ce77cd5940d4e15158190ed6050e7 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 12:41:15 -0500 Subject: [PATCH 01/16] - moving the SRA tests to a separate env --- .travis.yml | 3 +++ build.gradle | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 45bc976612..7df6c671d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,12 +15,15 @@ matrix: fast_finish: true allow_failures: - env: TEST_TYPE=FTP + - env: TEST_TYPE=SRA include: - jdk: oraclejdk8 env: TEST_TYPE=FTP script: - if [[ $TEST_TYPE == "FTP" ]]; then ./gradlew testFTP jacocoTestReport; + elif [[ $TEST_TYPE == "SRA" ]]; then + ./gradlew testSRA jacocoTestReport; else ./gradlew test jacocoTestReport; fi diff --git a/build.gradle b/build.gradle index 49ffec0051..69dfc85371 100644 --- a/build.gradle +++ b/build.gradle @@ -113,7 +113,8 @@ test { exclude "broken" exclude "defaultReference" exclude "ftp" - if (System.env.CI == "false") exclude "sra" + exclude "sra" + //if (System.env.CI == "false") exclude "sra" if (!OperatingSystem.current().isUnix()) exclude "unix" } } dependsOn findScalaAndJavaTypes, testWithDefaultReference @@ -132,6 +133,7 @@ task testSRA(type: Test) { description = "Run the SRA tests" jvmArgs += '-Dsamjdk.sra_libraries_download=true' + include "SRA" tags { exclude "slow" exclude "broken" From ef6f92c75506ecab0bf3c51f6437a11af1838c42 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 12:48:34 -0500 Subject: [PATCH 02/16] - moving the SRA tests to a separate env --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7df6c671d3..63c31447a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,9 @@ matrix: include: - jdk: oraclejdk8 env: TEST_TYPE=FTP + - jdk: oraclejdk8 + env: TEST_TYPE=SRA + script: - if [[ $TEST_TYPE == "FTP" ]]; then ./gradlew testFTP jacocoTestReport; From 95ae46687d2307b389374353e2ea4b8eac32ab64 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 13:28:58 -0500 Subject: [PATCH 03/16] - moving the SRA tests to a separate env --- build.gradle | 5 +++-- src/test/java/htsjdk/samtools/sra/SRAQueryTest.java | 2 -- src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 69dfc85371..d3b111e55e 100644 --- a/build.gradle +++ b/build.gradle @@ -108,12 +108,13 @@ test { jvmArgs += '-Dsamjdk.sra_libraries_download=true' } + excludeGroups 'sra' + tags { exclude "slow" exclude "broken" exclude "defaultReference" exclude "ftp" - exclude "sra" //if (System.env.CI == "false") exclude "sra" if (!OperatingSystem.current().isUnix()) exclude "unix" } @@ -133,7 +134,7 @@ task testSRA(type: Test) { description = "Run the SRA tests" jvmArgs += '-Dsamjdk.sra_libraries_download=true' - include "SRA" + include "sra" tags { exclude "slow" exclude "broken" diff --git a/src/test/java/htsjdk/samtools/sra/SRAQueryTest.java b/src/test/java/htsjdk/samtools/sra/SRAQueryTest.java index 575b3dd902..46674b6088 100644 --- a/src/test/java/htsjdk/samtools/sra/SRAQueryTest.java +++ b/src/test/java/htsjdk/samtools/sra/SRAQueryTest.java @@ -68,6 +68,4 @@ public void testQueryCounts(String acc, String reference, int referenceStart, in assertCorrectCountsOfMappedAndUnmappedRecords(samRecordIterator, expectedNumMapped, expectedNumUnmapped); } - - } diff --git a/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java b/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java index dd2b374258..41f0dc3d8f 100644 --- a/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java +++ b/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java @@ -21,7 +21,7 @@ private Object[][] createDataForReference() { }; } - @Test(dataProvider = "testReference") + @Test(dataProvider = "testReference", groups={"sra"}) public void testReference(String acc, String refContig, int refStart, int refStop, String refBases) { final ReferenceSequenceFile refSeqFile = new SRAIndexedSequenceFile(new SRAAccession(acc)); final ReferenceSequence refSeq = refSeqFile.getSubsequenceAt(refContig, refStart, refStop); @@ -61,7 +61,7 @@ private Object[][] createDataForReferenceMt() { }; } - @Test(dataProvider = "testReferenceMt") + @Test(dataProvider = "testReferenceMt", groups={"sra"}) public void testReferenceMt(String acc, List parallelTests) throws Exception { final ReferenceSequenceFile refSeqFile = new SRAIndexedSequenceFile(new SRAAccession(acc)); final long timeout = 1000L * 5; // just in case From fa031c334b2011151b8cf1200b5440a919c3cdcc Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 13:32:25 -0500 Subject: [PATCH 04/16] - moving the SRA tests to a separate env --- build.gradle | 3 +-- src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index d3b111e55e..88e7a10ce4 100644 --- a/build.gradle +++ b/build.gradle @@ -108,13 +108,12 @@ test { jvmArgs += '-Dsamjdk.sra_libraries_download=true' } - excludeGroups 'sra' - tags { exclude "slow" exclude "broken" exclude "defaultReference" exclude "ftp" + exclude 'sra' //if (System.env.CI == "false") exclude "sra" if (!OperatingSystem.current().isUnix()) exclude "unix" } diff --git a/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java b/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java index 41f0dc3d8f..011526ba30 100644 --- a/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java +++ b/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java @@ -13,6 +13,7 @@ import java.util.List; import java.util.Map; +@Test(groups = {"sra"}) public class SRAReferenceTest extends AbstractSRATest { @DataProvider(name = "testReference") private Object[][] createDataForReference() { From 5fa4944c979a44354554368d084fdc2d5e31dd64 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 13:49:56 -0500 Subject: [PATCH 05/16] - actually testing SRA tests... --- .travis.yml | 6 +++--- build.gradle | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 63c31447a9..797730d7bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,13 +14,13 @@ jdk: matrix: fast_finish: true allow_failures: - - env: TEST_TYPE=FTP - env: TEST_TYPE=SRA + - env: TEST_TYPE=FTP include: - - jdk: oraclejdk8 - env: TEST_TYPE=FTP - jdk: oraclejdk8 env: TEST_TYPE=SRA + - jdk: oraclejdk8 + env: TEST_TYPE=FTP script: - if [[ $TEST_TYPE == "FTP" ]]; then diff --git a/build.gradle b/build.gradle index 88e7a10ce4..59f1f81c85 100644 --- a/build.gradle +++ b/build.gradle @@ -133,8 +133,8 @@ task testSRA(type: Test) { description = "Run the SRA tests" jvmArgs += '-Dsamjdk.sra_libraries_download=true' - include "sra" tags { + include "sra" exclude "slow" exclude "broken" } From aee3b778c848ee055c19bc0dbaaf81ec7896501c Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 14:07:28 -0500 Subject: [PATCH 06/16] - ENA tests also fail internitenetly, so making them part of the ftp group --- src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java | 2 +- .../java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java b/src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java index 593900d24d..25c8717d82 100644 --- a/src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java +++ b/src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java @@ -22,7 +22,7 @@ public class EnaRefService { byte[] getSequence(final String md5) { final int restBetweenTries_ms = 0; final int maxTries = 1; - final int timeout_ms = 0; + final int timeout_ms = 5000; return getSequence(md5, timeout_ms, maxTries, restBetweenTries_ms); } diff --git a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java index ce505f485b..e0ac992ad3 100644 --- a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java +++ b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java @@ -9,14 +9,15 @@ public class EnaRefServiceTest extends HtsjdkTest { - @DataProvider(name="testEnaRefServiceData") + @DataProvider() public Object[][] testEnaRefServiceData(){ return new Object[][]{{"57151e6196306db5d9f33133572a5482"}, {"0000088cbcebe818eb431d58c908c698"}}; } - @Test(dataProvider = "testEnaRefServiceData") - public void testEnaRefServiceData(final String md5) throws IOException, GaveUpException { + //calling this an FTP test so that it could fail in travis + @Test(dataProvider = "testEnaRefServiceData", groups="ftp") + public void testEnaRefService(final String md5) throws IOException, GaveUpException { Assert.assertNotNull(new EnaRefService().getSequence(md5)); } } From d5dbaff4efaaceed6eac2e193ee7fbd280e5107e Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 14:08:01 -0500 Subject: [PATCH 07/16] - oops --- src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java b/src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java index 25c8717d82..593900d24d 100644 --- a/src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java +++ b/src/main/java/htsjdk/samtools/cram/ref/EnaRefService.java @@ -22,7 +22,7 @@ public class EnaRefService { byte[] getSequence(final String md5) { final int restBetweenTries_ms = 0; final int maxTries = 1; - final int timeout_ms = 5000; + final int timeout_ms = 0; return getSequence(md5, timeout_ms, maxTries, restBetweenTries_ms); } From 5947e9f49f968de4f7baa6b622ec26d9a3b012e6 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 14:30:29 -0500 Subject: [PATCH 08/16] - cleanup --- build.gradle | 3 +-- src/test/java/htsjdk/TestClassDependenceTest.java | 3 +-- src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 59f1f81c85..0b15e7fb51 100644 --- a/build.gradle +++ b/build.gradle @@ -113,8 +113,7 @@ test { exclude "broken" exclude "defaultReference" exclude "ftp" - exclude 'sra' - //if (System.env.CI == "false") exclude "sra" + exclude "sra" if (!OperatingSystem.current().isUnix()) exclude "unix" } } dependsOn findScalaAndJavaTypes, testWithDefaultReference diff --git a/src/test/java/htsjdk/TestClassDependenceTest.java b/src/test/java/htsjdk/TestClassDependenceTest.java index 9ed9a1167e..f487b27747 100644 --- a/src/test/java/htsjdk/TestClassDependenceTest.java +++ b/src/test/java/htsjdk/TestClassDependenceTest.java @@ -21,8 +21,7 @@ */ public class TestClassDependenceTest extends HtsjdkTest { - - // since there are assertions inside the dataprovider, this test check that the dataprovider completes succeessfully. + // since there are assertions inside the dataprovider, this test checks that the dataprovider completes succeessfully. // This is needed since a failing data-provider will result in silently skipping the tests that rely on it. // This idea led to the creation of {@link TestDataProviders}, which renders it no-longer needed.... diff --git a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java index e0ac992ad3..b140db43a6 100644 --- a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java +++ b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java @@ -7,6 +7,7 @@ import java.io.IOException; +@Test(groups={"ftp"}) public class EnaRefServiceTest extends HtsjdkTest { @DataProvider() @@ -16,7 +17,7 @@ public Object[][] testEnaRefServiceData(){ } //calling this an FTP test so that it could fail in travis - @Test(dataProvider = "testEnaRefServiceData", groups="ftp") + @Test(dataProvider = "testEnaRefServiceData", groups={"ftp"}) public void testEnaRefService(final String md5) throws IOException, GaveUpException { Assert.assertNotNull(new EnaRefService().getSequence(md5)); } From 5e0ea1dd11ee7c6960259bc5a94844c77ae17987 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 14:32:16 -0500 Subject: [PATCH 09/16] - cleanup --- src/test/java/htsjdk/samtools/sra/AbstractSRATest.java | 2 +- src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/htsjdk/samtools/sra/AbstractSRATest.java b/src/test/java/htsjdk/samtools/sra/AbstractSRATest.java index eeba1d2ea9..164c02d5ec 100644 --- a/src/test/java/htsjdk/samtools/sra/AbstractSRATest.java +++ b/src/test/java/htsjdk/samtools/sra/AbstractSRATest.java @@ -12,7 +12,7 @@ import java.lang.reflect.Method; import java.util.NoSuchElementException; -@Test(groups = "sra") +@Test(groups = {"sra"}) public abstract class AbstractSRATest extends HtsjdkTest { private static boolean canResolveNetworkAccession = false; private static String checkAccession = "SRR000123"; diff --git a/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java b/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java index 011526ba30..6f79e4452a 100644 --- a/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java +++ b/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java @@ -13,7 +13,7 @@ import java.util.List; import java.util.Map; -@Test(groups = {"sra"}) +@Test() public class SRAReferenceTest extends AbstractSRATest { @DataProvider(name = "testReference") private Object[][] createDataForReference() { @@ -22,7 +22,7 @@ private Object[][] createDataForReference() { }; } - @Test(dataProvider = "testReference", groups={"sra"}) + @Test(dataProvider = "testReference") public void testReference(String acc, String refContig, int refStart, int refStop, String refBases) { final ReferenceSequenceFile refSeqFile = new SRAIndexedSequenceFile(new SRAAccession(acc)); final ReferenceSequence refSeq = refSeqFile.getSubsequenceAt(refContig, refStart, refStop); @@ -62,7 +62,7 @@ private Object[][] createDataForReferenceMt() { }; } - @Test(dataProvider = "testReferenceMt", groups={"sra"}) + @Test(dataProvider = "testReferenceMt") public void testReferenceMt(String acc, List parallelTests) throws Exception { final ReferenceSequenceFile refSeqFile = new SRAIndexedSequenceFile(new SRAAccession(acc)); final long timeout = 1000L * 5; // just in case From 8765ea881d23d661556284941915aae64c871255 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 14:33:36 -0500 Subject: [PATCH 10/16] - cleanup --- src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java b/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java index 6f79e4452a..dd2b374258 100644 --- a/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java +++ b/src/test/java/htsjdk/samtools/sra/SRAReferenceTest.java @@ -13,7 +13,6 @@ import java.util.List; import java.util.Map; -@Test() public class SRAReferenceTest extends AbstractSRATest { @DataProvider(name = "testReference") private Object[][] createDataForReference() { From 475de7125d42f58b6d117e0adc687dc473fbbcd2 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 14:35:37 -0500 Subject: [PATCH 11/16] - cleanup --- src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java | 2 +- src/test/java/htsjdk/samtools/sra/AbstractSRATest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java index b140db43a6..d75f95df34 100644 --- a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java +++ b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java @@ -17,7 +17,7 @@ public Object[][] testEnaRefServiceData(){ } //calling this an FTP test so that it could fail in travis - @Test(dataProvider = "testEnaRefServiceData", groups={"ftp"}) + @Test(dataProvider = "testEnaRefServiceData") public void testEnaRefService(final String md5) throws IOException, GaveUpException { Assert.assertNotNull(new EnaRefService().getSequence(md5)); } diff --git a/src/test/java/htsjdk/samtools/sra/AbstractSRATest.java b/src/test/java/htsjdk/samtools/sra/AbstractSRATest.java index 164c02d5ec..eeba1d2ea9 100644 --- a/src/test/java/htsjdk/samtools/sra/AbstractSRATest.java +++ b/src/test/java/htsjdk/samtools/sra/AbstractSRATest.java @@ -12,7 +12,7 @@ import java.lang.reflect.Method; import java.util.NoSuchElementException; -@Test(groups = {"sra"}) +@Test(groups = "sra") public abstract class AbstractSRATest extends HtsjdkTest { private static boolean canResolveNetworkAccession = false; private static String checkAccession = "SRR000123"; From 4ad0001b986a981d429ccd8554772dc28c1a52c8 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 14:37:54 -0500 Subject: [PATCH 12/16] - cleanup --- src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java index d75f95df34..82434a8552 100644 --- a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java +++ b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java @@ -7,10 +7,10 @@ import java.io.IOException; -@Test(groups={"ftp"}) +@Test(groups="ftp") public class EnaRefServiceTest extends HtsjdkTest { - @DataProvider() + @DataProvider(name="testEnaRefServiceData") public Object[][] testEnaRefServiceData(){ return new Object[][]{{"57151e6196306db5d9f33133572a5482"}, {"0000088cbcebe818eb431d58c908c698"}}; From 56a3837db57b203eeab517d59a40eedbf8ee06e1 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 14:38:28 -0500 Subject: [PATCH 13/16] - cleanup --- src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java index 82434a8552..85abe650a8 100644 --- a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java +++ b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java @@ -18,7 +18,7 @@ public Object[][] testEnaRefServiceData(){ //calling this an FTP test so that it could fail in travis @Test(dataProvider = "testEnaRefServiceData") - public void testEnaRefService(final String md5) throws IOException, GaveUpException { + public void testEnaRefServiceData(final String md5) throws IOException, GaveUpException { Assert.assertNotNull(new EnaRefService().getSequence(md5)); } } From 1659775cc91a89ea1f51b832ef8b1466074c72a3 Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Sat, 2 Feb 2019 14:39:03 -0500 Subject: [PATCH 14/16] - cleanup --- src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java index 85abe650a8..757af22da6 100644 --- a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java +++ b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java @@ -7,6 +7,7 @@ import java.io.IOException; +//calling this an FTP test so that it could fail in travis @Test(groups="ftp") public class EnaRefServiceTest extends HtsjdkTest { @@ -16,7 +17,6 @@ public Object[][] testEnaRefServiceData(){ {"0000088cbcebe818eb431d58c908c698"}}; } - //calling this an FTP test so that it could fail in travis @Test(dataProvider = "testEnaRefServiceData") public void testEnaRefServiceData(final String md5) throws IOException, GaveUpException { Assert.assertNotNull(new EnaRefService().getSequence(md5)); From aff62e171e48de2d17ee3c3aa1e9978e800c6c0e Mon Sep 17 00:00:00 2001 From: Yossi Farjoun Date: Tue, 5 Feb 2019 17:10:53 -0500 Subject: [PATCH 15/16] moved ENA and SRA tey killed later.sts to ExternalApis so that FTP tests can be easil --- .travis.yml | 8 ++++---- build.gradle | 11 +++++------ .../htsjdk/samtools/cram/ref/EnaRefServiceTest.java | 3 +-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 797730d7bb..a176d9b1b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,19 +14,19 @@ jdk: matrix: fast_finish: true allow_failures: - - env: TEST_TYPE=SRA + - env: TEST_TYPE=EXTERNAL_APIS - env: TEST_TYPE=FTP include: - jdk: oraclejdk8 - env: TEST_TYPE=SRA + env: TEST_TYPE=EXTERNAL_APIS - jdk: oraclejdk8 env: TEST_TYPE=FTP script: - if [[ $TEST_TYPE == "FTP" ]]; then ./gradlew testFTP jacocoTestReport; - elif [[ $TEST_TYPE == "SRA" ]]; then - ./gradlew testSRA jacocoTestReport; + elif [[ $TEST_TYPE == "EXTERNAL_APIS" ]]; then + ./gradlew testExternalApis jacocoTestReport; else ./gradlew test jacocoTestReport; fi diff --git a/build.gradle b/build.gradle index 0b15e7fb51..c711c4306d 100644 --- a/build.gradle +++ b/build.gradle @@ -104,16 +104,14 @@ test { events "failed", "skipped" } - if (System.env.CI == "true") { - jvmArgs += '-Dsamjdk.sra_libraries_download=true' - } - tags { exclude "slow" exclude "broken" exclude "defaultReference" exclude "ftp" exclude "sra" + exclude "ena" + if (!OperatingSystem.current().isUnix()) exclude "unix" } } dependsOn findScalaAndJavaTypes, testWithDefaultReference @@ -128,12 +126,13 @@ task testFTP(type: Test) { } } -task testSRA(type: Test) { - description = "Run the SRA tests" +task testExternalApis(type: Test) { + description = "Run the SRA and ENA tests (external APIs" jvmArgs += '-Dsamjdk.sra_libraries_download=true' tags { include "sra" + include "ena" exclude "slow" exclude "broken" } diff --git a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java index 757af22da6..57aa108776 100644 --- a/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java +++ b/src/test/java/htsjdk/samtools/cram/ref/EnaRefServiceTest.java @@ -7,8 +7,7 @@ import java.io.IOException; -//calling this an FTP test so that it could fail in travis -@Test(groups="ftp") +@Test(groups="ena") public class EnaRefServiceTest extends HtsjdkTest { @DataProvider(name="testEnaRefServiceData") From 1f7aaaa97336d749ab8622c5517d79a3fa5b5924 Mon Sep 17 00:00:00 2001 From: Louis Bergelson Date: Tue, 5 Feb 2019 21:08:12 -0500 Subject: [PATCH 16/16] Update build.gradle Co-Authored-By: yfarjoun --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c711c4306d..6b272c171b 100644 --- a/build.gradle +++ b/build.gradle @@ -127,7 +127,7 @@ task testFTP(type: Test) { } task testExternalApis(type: Test) { - description = "Run the SRA and ENA tests (external APIs" + description = "Run the SRA and ENA tests (tests that interact with external APIs)" jvmArgs += '-Dsamjdk.sra_libraries_download=true' tags {