service/dap: fix TestPreSetBreakpoint (#2600)
TestPreSetBreakpoint sometimes fail because a goroutine is stopped in some runtime/internal package instead of just 'runtime'.
This commit is contained in:
parent
d6556b85b1
commit
38aaf274a9
@ -515,7 +515,7 @@ func TestPreSetBreakpoint(t *testing.T) {
|
||||
wantMain := dap.Thread{Id: 1, Name: "* [Go 1] main.Increment (Thread ...)"}
|
||||
wantRuntime := dap.Thread{Id: 2, Name: "[Go 2] runtime.gopark"}
|
||||
for _, got := range tResp.Body.Threads {
|
||||
if got.Id != 1 && !reMain.MatchString(got.Name) && !strings.Contains(got.Name, "runtime.") {
|
||||
if got.Id != 1 && !reMain.MatchString(got.Name) && !(strings.Contains(got.Name, "runtime.") || strings.Contains(got.Name, "runtime/")) {
|
||||
t.Errorf("\ngot %#v\nwant []dap.Thread{%#v, %#v, ...}", tResp.Body.Threads, wantMain, wantRuntime)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user