diff options
Diffstat (limited to 'src/test/java/com/google')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java b/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java index d6674931fb..8aea1889d7 100644 --- a/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java +++ b/src/test/java/com/google/devtools/build/lib/skylarkdebug/server/SkylarkDebugServerTest.java @@ -169,7 +169,7 @@ public class SkylarkDebugServerTest { Environment env = newEnvironment(); Location breakpoint = - Location.newBuilder().setLineNumber(2).setPath("/a/build/file/BUILD").build(); + Location.newBuilder().setLineNumber(1).setPath("/a/build/file/BUILD").build(); setBreakpoints(ImmutableList.of(breakpoint)); Thread evaluationThread = execInWorkerThread(buildFile, env); @@ -179,6 +179,22 @@ public class SkylarkDebugServerTest { // wait for breakpoint to be hit client.waitForEvent(DebugEvent::hasThreadPaused, Duration.ofSeconds(5)); + assertThat(client.unnumberedEvents) + .contains( + DebugEventHelper.threadPausedEvent( + SkylarkDebuggingProtos.Thread.newBuilder() + .setName(threadName) + .setId(threadId) + .setIsPaused(true) + .setLocation(breakpoint.toBuilder().setColumnNumber(1)) + .build(), + ImmutableList.of( + Frame.newBuilder() + .setFunctionName("<top level>") + .setLocation(breakpoint.toBuilder().setColumnNumber(1)) + .addScope(Scope.newBuilder().setName("global")) + .build()))); + assertThat(listThreads().getThreadList()) .containsExactly( SkylarkDebuggingProtos.Thread.newBuilder() |