diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-10-03 10:46:42 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-10-03 10:47:52 -0700 |
commit | 37e57a903cf0d40e53a97eb3d47036024d7536c3 (patch) | |
tree | 9ab8e6f025d6f259b5c42f4fa89b1a7b1cbb804c /runsc/container/multi_container_test.go | |
parent | 55d28fb124dc4caa9047c5ca9150c82f073e70b2 (diff) |
Fix arithmetic error in multi_container_test.
We add an additional (2^3)-1=7 processes, but the code was only waiting for 3.
I switched back to Math.Pow format to make the arithmetic easier to inspect.
PiperOrigin-RevId: 215588140
Change-Id: Iccad4d6f977c1bfc5c4b08d3493afe553fe25733
Diffstat (limited to 'runsc/container/multi_container_test.go')
-rw-r--r-- | runsc/container/multi_container_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runsc/container/multi_container_test.go b/runsc/container/multi_container_test.go index ab200b75c..d23d36c37 100644 --- a/runsc/container/multi_container_test.go +++ b/runsc/container/multi_container_test.go @@ -568,7 +568,8 @@ func TestMultiContainerKillAll(t *testing.T) { if _, err := containers[1].Execute(args); err != nil { t.Fatalf("error exec'ing: %v", err) } - procCount += 3 + // Wait for these new processes to start. + procCount += int(math.Pow(2, 3) - 1) if err := waitForProcessCount(containers[1], procCount); err != nil { t.Fatal(err) } |