fixed graph test issue (and a few other improviements)> Mainly protecting against creating ridiculously large icons in tests because of a strange headless environment.

This commit is contained in:
ghidravore 2021-08-18 12:28:12 -04:00
parent 5e5d474279
commit 1fd6b54f07
6 changed files with 149 additions and 75 deletions

View file

@ -33,6 +33,7 @@ import ghidra.graph.visualization.GroupVertex;
import ghidra.service.graph.*;
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
import ghidra.test.TestEnv;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
public class GraphActionsTest extends AbstractGhidraHeadedIntegrationTest {
@ -445,7 +446,18 @@ public class GraphActionsTest extends AbstractGhidraHeadedIntegrationTest {
GraphDisplayBroker broker = tool.getService(GraphDisplayBroker.class);
GraphDisplayProvider service = broker.getGraphDisplayProvider("Default Graph Display");
display = service.getGraphDisplay(false, TaskMonitor.DUMMY);
display.setGraph(graph, "test graph", false, TaskMonitor.DUMMY);
GraphDisplayOptions options = new GraphDisplayOptions(graph.getGraphType());
runSwing(() -> {
try {
display.setGraph(graph, options, "test graph", false, TaskMonitor.DUMMY);
}
catch (CancelledException e) {
// can't happen with a dummy monitor
}
});
display.setGraphDisplayListener(new TestGraphDisplayListener("test"));
}