git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
116c74a
)
JAL-1889 hack to ensure endRes is computed in setUp
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 13 Mar 2019 11:57:54 +0000
(11:57 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Wed, 13 Mar 2019 11:57:54 +0000
(11:57 +0000)
test/jalview/gui/AlignmentPanelTest.java
patch
|
blob
|
history
diff --git
a/test/jalview/gui/AlignmentPanelTest.java
b/test/jalview/gui/AlignmentPanelTest.java
index
e84b87a
..
58f7324
100644
(file)
--- a/
test/jalview/gui/AlignmentPanelTest.java
+++ b/
test/jalview/gui/AlignmentPanelTest.java
@@
-31,6
+31,10
@@
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
import jalview.viewmodel.ViewportRanges;
import jalview.io.FileLoader;
import jalview.viewmodel.ViewportRanges;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.SwingUtilities;
+
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@
-131,7
+135,7
@@
public class AlignmentPanelTest
AlignFrame af;
@BeforeMethod(alwaysRun = true)
AlignFrame af;
@BeforeMethod(alwaysRun = true)
- public void setUp()
+ public void setUp() throws InvocationTargetException, InterruptedException
{
Jalview.main(new String[] { "-nonews", "-props",
"test/jalview/testProps.jvprops" });
{
Jalview.main(new String[] { "-nonews", "-props",
"test/jalview/testProps.jvprops" });
@@
-140,6
+144,15
@@
public class AlignmentPanelTest
Boolean.TRUE.toString());
af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
DataSourceType.FILE);
Boolean.TRUE.toString());
af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
DataSourceType.FILE);
+
+ /*
+ * ensure the panel has been repainted and so ViewportRanges set
+ */
+ SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ af.repaint();
+ }});
/*
* wait for Consensus thread to complete
/*
* wait for Consensus thread to complete