github.com/shuguocloud/go-zero@v1.3.0/core/proc/goroutines_test.go (about)

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