From 5f7d4e56278e391f1b2ae78c59dc263d43ab85f9 Mon Sep 17 00:00:00 2001 From: BobHanson Date: Mon, 23 Mar 2020 15:53:07 -0500 Subject: [PATCH] Bamboo test #11 - adding single threaded and thread names --- test/jalview/gui/AlignmentPanelTest.java | 1 + test/jalview/gui/SeqCanvasTest.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/test/jalview/gui/AlignmentPanelTest.java b/test/jalview/gui/AlignmentPanelTest.java index f16b2ee..5ae8f20 100644 --- a/test/jalview/gui/AlignmentPanelTest.java +++ b/test/jalview/gui/AlignmentPanelTest.java @@ -36,6 +36,7 @@ import java.lang.reflect.InvocationTargetException; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; +@Test(singleThreaded = true) public class AlignmentPanelTest { SequenceI seq1 = new Sequence( diff --git a/test/jalview/gui/SeqCanvasTest.java b/test/jalview/gui/SeqCanvasTest.java index d74ef57..6f5fa2e 100644 --- a/test/jalview/gui/SeqCanvasTest.java +++ b/test/jalview/gui/SeqCanvasTest.java @@ -38,11 +38,14 @@ import org.testng.annotations.Test; import junit.extensions.PA; +@Test(singleThreaded = true) public class SeqCanvasTest { @BeforeClass(alwaysRun = true) public void setUp() { + Thread.currentThread().setName("SeqCanvasTest Setup " + ++nTest); + Cache.initLogger(); Jalview.setSynchronous(true); } @@ -54,6 +57,7 @@ public class SeqCanvasTest @Test(groups = "Functional") public void testCalculateWrappedGeometry_noAnnotations() { + Thread.currentThread().setName("SeqCanvasTest noAnn " + ++nTest); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/uniref50.fa", DataSourceType.FILE); AlignViewport av = af.getViewport(); @@ -248,6 +252,7 @@ public class SeqCanvasTest @Test(groups = "Functional") public void testCalculateWrappedGeometry_withAnnotations() { + Thread.currentThread().setName("SeqCanvasTest wAnn " + ++nTest); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/uniref50.fa", DataSourceType.FILE); AlignViewport av = af.getViewport(); @@ -364,6 +369,7 @@ public class SeqCanvasTest assertEquals(PA.getValue(testee, "wrappedVisibleWidths"), 3); } + private static int nTest = 0; /** * Test simulates loading an unwrapped alignment, shrinking it vertically so * not all sequences are visible, then changing to wrapped mode. The ranges @@ -373,6 +379,7 @@ public class SeqCanvasTest @Test(groups = "Functional") public void testCalculateWrappedGeometry_fromScrolled() { + Thread.currentThread().setName("SeqCanvasTest fromScrolled " + ++nTest); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/uniref50.fa", DataSourceType.FILE); AlignViewport av = af.getViewport(); -- 1.7.10.2