goroutines_test.go 257 B

12345678910111213141516
  1. package proc
  2. import (
  3. "log"
  4. "strings"
  5. "testing"
  6. "github.com/stretchr/testify/assert"
  7. )
  8. func TestDumpGoroutines(t *testing.T) {
  9. var buf strings.Builder
  10. log.SetOutput(&buf)
  11. dumpGoroutines()
  12. assert.True(t, strings.Contains(buf.String(), ".dump"))
  13. }