Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite TestRunMutableNetworkFiles to avoid races #10072

Merged
merged 1 commit into from
Jan 14, 2015
Merged

Rewrite TestRunMutableNetworkFiles to avoid races #10072

merged 1 commit into from
Jan 14, 2015

Conversation

LK4D4
Copy link
Contributor

@LK4D4 LK4D4 commented Jan 13, 2015

ping @icecrime

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
@@ -2016,16 +2016,16 @@ func TestRunMutableNetworkFiles(t *testing.T) {
t.Fatal("Content was not what was modified in the container", string(content))
}

out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "-d", "--name", "c2", "busybox", "sh", "-c", fmt.Sprintf("while true; do cat /etc/%s; sleep 1; done", fn)))
out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "-d", "--name", "c2", "busybox", "top"))
if err != nil {
t.Fatal(err)
}

contID := strings.TrimSpace(out)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this contID? We already named it "c2" anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we need :/ containerStorageFile requires id.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, sorry.

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jan 14, 2015

@icecrime @jfrazelle WDYT?

@icecrime
Copy link
Contributor

LGTM

1 similar comment
@jessfraz
Copy link
Contributor

LGTM

jessfraz pushed a commit that referenced this pull request Jan 14, 2015
Rewrite TestRunMutableNetworkFiles to avoid races
@jessfraz jessfraz merged commit 95fea08 into moby:master Jan 14, 2015
@LK4D4 LK4D4 deleted the fix_mutable_net_files branch January 14, 2015 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants