mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Test fixes
This commit is contained in:
@@ -181,7 +181,10 @@ public class XrefViewerTest extends AbstractGhidraHeadedIntegrationTest {
|
|||||||
selectRow(table, 0);
|
selectRow(table, 0);
|
||||||
assertTrue(runSwing(() -> deleteAction.isEnabled()));
|
assertTrue(runSwing(() -> deleteAction.isEnabled()));
|
||||||
|
|
||||||
performAction(deleteAction, table, true);
|
performAction(deleteAction, table, false);
|
||||||
|
DialogComponentProvider dialog = waitForDialogComponent("Delete Xrefs?");
|
||||||
|
pressButtonByText(dialog, "Delete");
|
||||||
|
waitForTableModel(table.getModel());
|
||||||
|
|
||||||
assertEquals(0, table.getModel().getRowCount());
|
assertEquals(0, table.getModel().getRowCount());
|
||||||
assertReference("01001009", "01001005", false);
|
assertReference("01001009", "01001005", false);
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ public class ConcurrentTestExceptionStatement extends Statement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isRunningFromEclipse() {
|
private boolean isRunningFromEclipse() {
|
||||||
// TODO: this may need adjustment for other Eclipse platforms/versions
|
|
||||||
return System.getProperty("java.class.path").endsWith(".cp");
|
return System.getProperty("java.class.path").endsWith(".cp");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +194,6 @@ public class ConcurrentTestExceptionStatement extends Statement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "removal" }) // Thread.stop()
|
|
||||||
private void checkForTestTimeout(TestThread testThread) {
|
private void checkForTestTimeout(TestThread testThread) {
|
||||||
|
|
||||||
if (timoutMonitor == null || !timoutMonitor.didRun()) {
|
if (timoutMonitor == null || !timoutMonitor.didRun()) {
|
||||||
@@ -216,9 +214,7 @@ public class ConcurrentTestExceptionStatement extends Statement {
|
|||||||
|
|
||||||
StackTraceElement[] trace = testThread.getStackTrace();
|
StackTraceElement[] trace = testThread.getStackTrace();
|
||||||
|
|
||||||
// if we get here, we are one step away from System.exit(1), so do the
|
testThread.interrupt();
|
||||||
// bad thing and kill the thread
|
|
||||||
testThread.stop();
|
|
||||||
lastTestThread = null; // don't try to join
|
lastTestThread = null; // don't try to join
|
||||||
AssertionFailedError error =
|
AssertionFailedError error =
|
||||||
new AssertionFailedError("Test locked-up--aborting! See log for details");
|
new AssertionFailedError("Test locked-up--aborting! See log for details");
|
||||||
|
|||||||
Reference in New Issue
Block a user