JAL-4107 patching tests after merge
[jalview.git] / test / jalview / project / Jalview2xmlTests.java
index 489916e..527a1a3 100644 (file)
@@ -93,7 +93,7 @@ import jalview.util.MapList;
 import jalview.util.matcher.Condition;
 import jalview.viewmodel.AlignmentViewport;
 import jalview.viewmodel.seqfeatures.FeatureRendererModel;
-
+import jalview.ws.sifts.SiftsSettings;
 import junit.extensions.PA;
 @Test(singleThreaded = true)
 public class Jalview2xmlTests extends Jalview2xmlBase
@@ -299,11 +299,21 @@ public class Jalview2xmlTests extends Jalview2xmlBase
   @Test(groups = { "Functional" })
   public void noDuplicatePdbMappingsMade() throws Exception
   {
+    boolean oldmws = SiftsSettings.isMapWithSifts();
+    SiftsSettings.setMapWithSifts(false);
     StructureImportSettings.setProcessSecondaryStructure(true);
     StructureImportSettings.setVisibleChainAnnotation(true);
     AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
             "examples/exampleFile_2_7.jar", DataSourceType.FILE);
     assertNotNull(af, "Didn't read in the example file correctly.");
+    // TODO JAL-4107 - we need to wait a sec here whilst PDB mappings are
+    // instantiated on the alignment
+    // TODO JAL-4107 - should LoadFileWaitTillLoaded not return till *after* all
+    // that business is done ?
+    
+    try {
+      Thread.sleep(1000);
+    } catch (InterruptedException foo) {}
 
     // locate Jmol viewer
     // count number of PDB mappings the structure selection manager holds -
@@ -313,6 +323,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
             af.getCurrentView().getStructureSelectionManager()
                     .getMapping(pdbFile).length,
             2, "Expected only two mappings for 1A70");
+    SiftsSettings.setMapWithSifts(oldmws);
 
   }