diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-09-18 15:20:19 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-18 15:21:28 -0700 |
commit | 7967d8ecd57383f406d202f7e2f65e275bb36fc8 (patch) | |
tree | c1902ae3bb809f14acd59cf9566d063c31407096 /runsc/sandbox/sandbox.go | |
parent | dd05c96d99b6dc7a8503c82e10ee5caeb6930cf6 (diff) |
Handle children processes better in tests
Reap children more systematically in container tests. Previously,
container_test was taking ~5 mins to run because constainer.Destroy()
would timeout waiting for the sandbox process to exit. Now the test
running in less than a minute.
Also made the contract around Container and Sandbox destroy clearer.
PiperOrigin-RevId: 213527471
Change-Id: Icca84ee1212bbdcb62bdfc9cc7b71b12c6d1688d
Diffstat (limited to 'runsc/sandbox/sandbox.go')
-rw-r--r-- | runsc/sandbox/sandbox.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go index 21625a7c6..f58d111bf 100644 --- a/runsc/sandbox/sandbox.go +++ b/runsc/sandbox/sandbox.go @@ -59,7 +59,8 @@ type Sandbox struct { Chroot string `json:"chroot"` } -// Create creates the sandbox process. +// Create creates the sandbox process. The caller must call Destroy() on the +// sandbox. func Create(id string, spec *specs.Spec, conf *boot.Config, bundleDir, consoleSocket string, ioFiles []*os.File) (*Sandbox, error) { s := &Sandbox{ID: id} |