goroutines_test.go 286 B

123456789101112131415
  1. package proc
  2. import (
  3. "strings"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. "github.com/zeromicro/go-zero/core/logx/logtest"
  7. )
  8. func TestDumpGoroutines(t *testing.T) {
  9. buf := logtest.NewCollector(t)
  10. dumpGoroutines()
  11. assert.True(t, strings.Contains(buf.String(), ".dump"))
  12. }