Skip to content

Commit

Permalink
Verify large stack has elided frames
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantv authored Apr 13, 2024
1 parent 71a9df0 commit effe6af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/stack/stacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ func TestAllLargeStack(t *testing.T) {
// We want to check this here, so that if the format of the "elided frames" message changes, we catch it.
// At the time of writing this test, with a stack depth of 101, we get 2 elided frames:
// "...2 frames elided...".
_, err := newStackParser(bytes.NewReader(buf)).Parse()
assert.Contains(t, string(buf), "frames elided...")
stacks, err := newStackParser(bytes.NewReader(buf)).Parse()
require.NoError(t, err)
assert.Greater(t, len(stacks), numGoroutines, "expect more parsed stacks than goroutines")

// Start enough goroutines so we exceed the default buffer size.
close(done)
Expand Down

0 comments on commit effe6af

Please sign in to comment.