Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving the SRA tests to a separate env #1272

Merged
merged 16 commits into from
Feb 6, 2019
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ jdk:
matrix:
fast_finish: true
allow_failures:
- env: TEST_TYPE=EXTERNAL_APIS
- env: TEST_TYPE=FTP
include:
- jdk: oraclejdk8
env: TEST_TYPE=EXTERNAL_APIS
- jdk: oraclejdk8
env: TEST_TYPE=FTP

script:
- if [[ $TEST_TYPE == "FTP" ]]; then
./gradlew testFTP jacocoTestReport;
elif [[ $TEST_TYPE == "EXTERNAL_APIS" ]]; then
./gradlew testExternalApis jacocoTestReport;
else
./gradlew test jacocoTestReport;
fi
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
if (System.env.CI == "false") exclude "sra"
exclude "sra"
exclude "ena"

if (!OperatingSystem.current().isUnix()) exclude "unix"
}
} dependsOn findScalaAndJavaTypes, testWithDefaultReference
Expand All @@ -128,11 +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 (tests that interact with external APIs)"
jvmArgs += '-Dsamjdk.sra_libraries_download=true'

tags {
include "sra"
include "ena"
exclude "slow"
exclude "broken"
}
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/htsjdk/TestClassDependenceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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....
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import java.io.IOException;

@Test(groups="ena")
public class EnaRefServiceTest extends HtsjdkTest {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like labelling this as an FTP test. Maybe instead of a new SRA block we can have an EXTERNAL_APIS test type that covers SRA and ENA.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.


@DataProvider(name="testEnaRefServiceData")
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/htsjdk/samtools/sra/SRAQueryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,4 @@ public void testQueryCounts(String acc, String reference, int referenceStart, in

assertCorrectCountsOfMappedAndUnmappedRecords(samRecordIterator, expectedNumMapped, expectedNumUnmapped);
}


}