/** * Binds this controller to a {@link CloudDebugProcessState} and initializes that state from the * server. * * @param state the {@link CloudDebugProcessState} the controller will be bound to */ public void initialize(@NotNull CloudDebugProcessState state) { this.state = state; state.setWaitToken(null); waitForChanges(); }
@Override public void run() { waitForChanges(); Timer timer = listBreakpointsJob; if (timer != null) { try { // We run after a short period to act as a throttle. timer.schedule(new RunnableTimerTask(this), PERIOD_MS); } catch (IllegalStateException ex) { // This can happen in rare race conditions and isn't an error. We just ignore it. } } } };
createBreakpoint("b1", Boolean.TRUE, 1000, "com/google/ex1.java", 15, null, null)); controller.waitForChanges(); List<Breakpoint> changedList = state.getCurrentServerBreakpointList(); assertNotEmpty(changedList);