From: gmungoc Date: Wed, 10 Jun 2020 09:14:13 +0000 (+0100) Subject: JAL-3446 more tweaks to tests failing on build server X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=76d3768510fea49f5b2498877d23a311be9c5220;p=jalview.git JAL-3446 more tweaks to tests failing on build server --- diff --git a/test/jalview/gui/AlignViewportTest.java b/test/jalview/gui/AlignViewportTest.java index c2983ec..60e10d1 100644 --- a/test/jalview/gui/AlignViewportTest.java +++ b/test/jalview/gui/AlignViewportTest.java @@ -35,7 +35,6 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import jalview.api.AlignCalcWorkerI; import jalview.bin.Cache; import jalview.bin.Jalview; import jalview.datamodel.AlignedCodonFrame; diff --git a/test/jalview/project/Jalview2xmlTests.java b/test/jalview/project/Jalview2xmlTests.java index e0930c9..95af77a 100644 --- a/test/jalview/project/Jalview2xmlTests.java +++ b/test/jalview/project/Jalview2xmlTests.java @@ -39,6 +39,7 @@ import javax.swing.JInternalFrame; import org.testng.Assert; import org.testng.AssertJUnit; +import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -94,6 +95,11 @@ import jalview.viewmodel.seqfeatures.FeatureRendererModel; @Test(singleThreaded = true) public class Jalview2xmlTests extends Jalview2xmlBase { + @AfterMethod(alwaysRun = true) + public void tearDown() + { + Desktop.getInstance().closeAll_actionPerformed(null); + } @Override @BeforeClass(alwaysRun = true) @@ -276,9 +282,9 @@ public class Jalview2xmlTests extends Jalview2xmlBase AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/exampleFile_2_7.jar", DataSourceType.FILE); assertNotNull(af, "Didn't read in the example file correctly."); - assertTrue(Desktop.getAlignFrames().length == 1 + origCount, + assertEquals(Desktop.getAlignFrames().length, + 1 + origCount, "Didn't gather the views in the example file."); - } /** diff --git a/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java b/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java index 6b1fbd2..22294a6 100644 --- a/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java +++ b/test/jalview/renderer/seqfeatures/FeatureColourFinderTest.java @@ -6,6 +6,13 @@ import static org.testng.Assert.assertNotEquals; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; +import java.awt.Color; +import java.util.List; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + import jalview.api.FeatureColourI; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; @@ -17,13 +24,6 @@ import jalview.schemes.FeatureColour; import jalview.viewmodel.seqfeatures.FeatureRendererModel; import jalview.viewmodel.seqfeatures.FeatureRendererModel.FeatureSettingsBean; -import java.awt.Color; -import java.util.List; - -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - /** * Unit tests for feature colour determination, including but not limited to *