2121package org .biojava .nbio .structure ;
2222
2323import org .biojava .nbio .core .util .FlatFileCache ;
24- import org .biojava .nbio .structure .io .LocalPDBDirectory ;
2524import org .biojava .nbio .structure .io .mmcif .DownloadChemCompProvider ;
2625import org .biojava .nbio .structure .io .mmcif .model .ChemComp ;
2726import org .junit .Test ;
@@ -47,39 +46,6 @@ public void testProtectedIDs(){
4746 assertEquals (cc .getId (), id );
4847 }
4948
50- @ Test
51- public void testRedirectWorks () {
52- // since August 2017, RCSB is redirecting:
53- // http://rcsb.org/pdb/files/ligand/HEM.cif ----> http://files.org/ligands/HEM.cif
54- // see #703
55-
56- File file = new File (DownloadChemCompProvider .getLocalFileName ("HEM" ));
57- file .delete ();
58-
59- DownloadChemCompProvider prov = new DownloadChemCompProvider ();
60-
61- DownloadChemCompProvider .serverBaseUrl = "http://www.rcsb.org/pdb/files/ligand/" ;
62-
63- ChemComp cc = prov .getChemComp ("HEM" );
64-
65- //System.out.println(file.toString());
66-
67- assertTrue (file .exists ());
68-
69- // just in case the we did get garbage, let's clean up
70- file .delete ();
71-
72- // very important: we have a memory cache of files, we need to reset it not to pollute the cache for later tests
73- FlatFileCache .clear ();
74-
75- assertNotNull (cc );
76-
77- assertNotNull (cc .getName ());
78-
79- // reset to default URL or otherwise we could affect other tests
80- DownloadChemCompProvider .serverBaseUrl = DownloadChemCompProvider .DEFAULT_SERVER_URL ;
81- }
82-
8349 @ Test
8450 public void testWeDontCacheGarbage () {
8551 // see #703
0 commit comments