File tree Expand file tree Collapse file tree
main/java/org/biojava/bio/structure/scop
test/java/org/biojava/bio/structure/scop Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -904,6 +904,12 @@ public void addMirror(String scopDownloadURL) {
904904 void addMirror (ScopMirror scopURLs ) {
905905 mirrors .add (scopURLs );
906906 }
907+ List <ScopMirror > getMirrors () {
908+ if (mirrors .isEmpty ()) {
909+ this .initScopURLs ();
910+ }
911+ return mirrors ;
912+ }
907913
908914 /* (non-Javadoc)
909915 * @see org.biojava.bio.structure.scop.ScopDatabase#getScopDomainsBySunid(java.lang.Integer)
Original file line number Diff line number Diff line change 2323import java .util .ArrayList ;
2424import java .util .Collection ;
2525
26+ import org .junit .Assume ;
2627import org .junit .runner .RunWith ;
2728import org .junit .runners .Parameterized ;
2829import org .junit .runners .Parameterized .Parameters ;
@@ -53,6 +54,16 @@ public static Collection<Object[]> availableDatabases() {
5354 }) {
5455 scop = new BerkeleyScopInstallation ();
5556 scop .setScopVersion (version );
57+ // Don't fail if the server is down
58+ boolean reachable = false ;
59+ for (ScopMirror mirror : scop .getMirrors ()) {
60+ if (mirror .isReachable ()) {
61+ reachable = true ;
62+ break ;
63+ }
64+ }
65+ Assume .assumeTrue ("SCOP server is currently unreachable." ,reachable );
66+
5667 databases .add (new Object [] {version , scop });
5768 }
5869 return databases ;
Original file line number Diff line number Diff line change 2323import java .util .ArrayList ;
2424import java .util .Collection ;
2525
26+ import org .junit .Assume ;
2627import org .junit .runner .RunWith ;
2728import org .junit .runners .Parameterized ;
2829import org .junit .runners .Parameterized .Parameters ;
@@ -51,6 +52,17 @@ public static Collection<Object[]> availableDatabases() {
5152 }) {
5253 scop = new ScopInstallation ();
5354 scop .setScopVersion (version );
55+
56+ // Don't fail if the server is down
57+ boolean reachable = false ;
58+ for (ScopMirror mirror : scop .getMirrors ()) {
59+ if (mirror .isReachable ()) {
60+ reachable = true ;
61+ break ;
62+ }
63+ }
64+ Assume .assumeTrue ("SCOP server is currently unreachable." ,reachable );
65+
5466 databases .add (new Object [] {version , scop });
5567 }
5668 return databases ;
You can’t perform that action at this time.
0 commit comments