service/dap: fix failing test on Go 1.21 (#3312)

This commit is contained in:
Alessandro Arzilli 2023-04-24 21:11:50 +02:00 committed by GitHub
parent 6d88b52509
commit 70b80623d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1920,15 +1920,7 @@ func TestScopesRequestsOptimized(t *testing.T) {
client.StackTraceRequest(1, 0, 20) client.StackTraceRequest(1, 0, 20)
stack := client.ExpectStackTraceResponse(t) stack := client.ExpectStackTraceResponse(t)
startLineno := 66 checkStackFramesExact(t, stack, "main.foobar", -1, 1000, 4, 4)
if runtime.GOOS == "windows" && goversion.VersionAfterOrEqual(runtime.Version(), 1, 15) {
// Go1.15 on windows inserts a NOP after the call to
// runtime.Breakpoint and marks it same line as the
// runtime.Breakpoint call, making this flaky, so skip the line check.
startLineno = -1
}
checkStackFramesExact(t, stack, "main.foobar", startLineno, 1000, 4, 4)
client.ScopesRequest(1000) client.ScopesRequest(1000)
scopes := client.ExpectScopesResponse(t) scopes := client.ExpectScopesResponse(t)