Ghidra is a software reverse engineering (SRE) framework
GP-0: Fix breakpoint provider tests
Dan4bfd22c4358b
diff --git a/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointsProviderTest.java b/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointsProviderTest.javaindex 0cd63f5a6f..e1c5452718 100644--- a/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointsProviderTest.java+++ b/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/breakpoint/DebuggerBreakpointsProviderTest.java@@ -75,12 +75,6 @@ public class DebuggerBreakpointsProviderTest extends AbstractGhidraHeadedDebuggebreakpointService = tool.getService(DebuggerLogicalBreakpointService.class);}- protected void waitAndFlush(TraceRecorder recorder) throws Throwable {- waitOn(recorder.getTarget().getModel().flushEvents());- waitOn(recorder.flushTransactions());- waitForDomainObject(recorder.getTrace());- }-protected void addMapping(Trace trace, Program prog) throws Exception {try (Transaction tx = trace.openTransaction("Add mapping")) {DebuggerStaticMappingUtils.addMapping(@@ -132,8 +126,7 @@ public class DebuggerBreakpointsProviderTest extends AbstractGhidraHeadedDebuggeTrace trace = recorder.getTrace();addLiveMemoryAndBreakpoint(mb.testProcess1, recorder);- waitOn(mb.testModel.flushEvents());- waitForDomainObject(trace);+ waitRecorder(recorder);// NB, optionally open trace. Mapping only works if open...traceManager.openTrace(trace);@@ -249,7 +242,7 @@ public class DebuggerBreakpointsProviderTest extends AbstractGhidraHeadedDebugge// NOTE: This acts on the corresponding target, not directly on tracewaitOn(lb.disableForTrace(trace));- waitAndFlush(recorder);+ waitRecorder(recorder);waitForPass(() -> assertEquals(State.DISABLED, row.getState()));@@ -260,7 +253,7 @@ public class DebuggerBreakpointsProviderTest extends AbstractGhidraHeadedDebugge// This duplicates the initial case, but without it, I just feel incompletewaitOn(lb.enableForTrace(trace));- waitAndFlush(recorder);+ waitRecorder(recorder);waitForPass(() -> assertEquals(State.ENABLED, row.getState()));}