Test fixes

This commit is contained in:
dragonmacher
2025-06-17 18:58:06 -04:00
parent 69872037e5
commit a58340b810
2 changed files with 5 additions and 6 deletions

View File

@@ -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);

View File

@@ -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");