2013-06-24 21:22:02 -04:00
|
|
|
package docker
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"testing"
|
2015-03-29 17:17:23 -04:00
|
|
|
|
|
|
|
"github.com/docker/docker/pkg/fileutils"
|
2013-06-24 21:22:02 -04:00
|
|
|
)
|
|
|
|
|
2013-07-24 18:48:18 -04:00
|
|
|
func displayFdGoroutines(t *testing.T) {
|
2015-03-29 17:17:23 -04:00
|
|
|
t.Logf("File Descriptors: %d, Goroutines: %d", fileutils.GetTotalUsedFds(), runtime.NumGoroutine())
|
2013-07-24 18:48:18 -04:00
|
|
|
}
|
|
|
|
|
2013-06-24 21:22:02 -04:00
|
|
|
func TestFinal(t *testing.T) {
|
2014-04-17 17:43:01 -04:00
|
|
|
nuke(globalDaemon)
|
2015-03-25 14:01:52 -04:00
|
|
|
t.Logf("Start File Descriptors: %d, Start Goroutines: %d", startFds, startGoroutines)
|
2013-07-24 18:48:18 -04:00
|
|
|
displayFdGoroutines(t)
|
2013-06-24 21:22:02 -04:00
|
|
|
}
|