JAL-2780 scan all test IDs before testing and reporting test failures - currently... bugs/JAL-2780_JAL-2781_pdbnegativenums
authorJim Procter <jprocter@issues.jalview.org>
Tue, 13 Feb 2018 16:16:04 +0000 (16:16 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 13 Feb 2018 16:16:04 +0000 (16:16 +0000)
test/jalview/ws/PDBSequenceFetcherTest.java

index 9efcef2..cc3dca8 100644 (file)
@@ -132,6 +132,7 @@ public class PDBSequenceFetcherTest
   private void testRetrieveProteinSeqFromPDB() throws Exception
   {
     List<DbSourceProxy> sps = sf.getSourceProxy("PDB");
+    StringBuilder errors = new StringBuilder();
     for (TestRetrieveObject str : toRetrieve)
     {
       AlignmentI response = sps.get(0).getSequenceRecords(str.id);
@@ -174,11 +175,11 @@ public class PDBSequenceFetcherTest
             lastp = sq.findPosition(col - 1);
           }
         }
-        if (errors.length() > 0)
-        {
-          Assert.fail(errors.toString());
-        }
       }
     }
+    if (errors.length() > 0)
+    {
+      Assert.fail(errors.toString());
+    }
   }
 }