Skip to content

Conversation

@runcom
Copy link
Member

@runcom runcom commented Apr 9, 2015

Removed the test also (relying on jobs, sooner or later that tests would be gone I suppose)

Signed-off-by: Antonio Murdaca me@runcom.ninja

@icecrime
Copy link
Contributor

icecrime commented Apr 9, 2015

Go home @GordonTheTurtle you're drunk.

@runcom
Copy link
Member Author

runcom commented Apr 9, 2015

😂

@jessfraz
Copy link
Contributor

jessfraz commented Apr 9, 2015

seriously amaze

On Thu, Apr 9, 2015 at 3:02 PM, Victor Vieux notifications@github.com
wrote:

[image: screen shot 2015-04-09 at 15 01 50]
https://cloud.githubusercontent.com/assets/1032519/7077892/652a00e6-dec9-11e4-82a0-49ba68ceb11b.png

This is amazing ^


Reply to this email directly or view it on GitHub
#12250 (comment).

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 9, 2015

But where is jenkins?

@icecrime
Copy link
Contributor

icecrime commented Apr 9, 2015

Amazing but should the test really go?

@runcom
Copy link
Member Author

runcom commented Apr 9, 2015

@icecrime test is broken I'm fixing it just now

Copy link
Contributor

Choose a reason for hiding this comment

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

why are we ignoring the error?

Copy link
Member Author

Choose a reason for hiding this comment

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

done soz

@icecrime
Copy link
Contributor

icecrime commented Apr 9, 2015

Sorry, I was referring to TestRestartKillWait: I don't understand why removing job would make this test obsolete? Wasn't testing a valid use case?

@runcom runcom force-pushed the remove-job-wait branch from 61d365a to ea301bb Compare April 9, 2015 22:16
Copy link
Contributor

Choose a reason for hiding this comment

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

why are you ignoring the error here?

Copy link
Contributor

Choose a reason for hiding this comment

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

lol sorry, I saw this again, and I thought my connection didn't send my earlier comment :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Was ignored before.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for bearing with the visually challenged :)

@runcom
Copy link
Member Author

runcom commented Apr 9, 2015

@icecrime mmm I'll reimplement it in integration-cli, is it ok?

@jessfraz
Copy link
Contributor

jessfraz commented Apr 9, 2015

yes perfect def not in integration we want to get rid of those :D

@runcom
Copy link
Member Author

runcom commented Apr 9, 2015

Yes I've seen your issue @jfrazelle

@tiborvass
Copy link
Contributor

Thanks @runcom you are simply awesome!

@runcom
Copy link
Member Author

runcom commented Apr 9, 2015

I wish I could do more :) @tiborvass

@runcom runcom force-pushed the remove-job-wait branch from ea301bb to 513a968 Compare April 9, 2015 23:21
@runcom
Copy link
Member Author

runcom commented Apr 9, 2015

@icecrime @tiborvass Added the integration-cli test and rebased

Copy link
Contributor

Choose a reason for hiding this comment

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

what the point of this?

Copy link
Member Author

Choose a reason for hiding this comment

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

#12109 (comment)
also here #11529

I think it make sense and started to use it whenever possible, if it's a bad pattern or unnecessary I'll remove it..

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm sure it makes no sense. In that PR I was just tired to understand what's going on.

Copy link
Member Author

Choose a reason for hiding this comment

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

mkay

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately I can't see the original context of the outdated diff very easily, so I don't know if it makes sense here. @LK4D4, just for my benefit since I value your opinion, are you saying you consider the "waitgroup to protect goroutine from running out of scope" pattern a bad thing? I'd be interested to know, and be aware of any alternatives :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@pwaller the context was the same, just protect a goroutine (in the test) (I suppose)

@runcom runcom force-pushed the remove-job-wait branch from 513a968 to 311d129 Compare April 9, 2015 23:34
Copy link
Member Author

Choose a reason for hiding this comment

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

@LK4D4 ok like this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe err?

@runcom runcom force-pushed the remove-job-wait branch from 311d129 to d958756 Compare April 9, 2015 23:36
Copy link
Contributor

Choose a reason for hiding this comment

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

seems like errchan <- err is enough without check and then you'll get nil in your e

@runcom runcom force-pushed the remove-job-wait branch from d958756 to 367a7f3 Compare April 9, 2015 23:38
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we lost my comment about not checking for nilness and not closing.

@runcom runcom force-pushed the remove-job-wait branch 2 times, most recently from bd815ac to 8febb67 Compare April 9, 2015 23:42
Copy link
Contributor

Choose a reason for hiding this comment

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

Lol, now I wonder why we need runCommand_WithOutput_ here :) maybe to chan we can pass:

fmt.Errorf("%v:\n%s", err, out)

Copy link
Contributor

Choose a reason for hiding this comment

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

But then we need != nil check back :P

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 😑

Copy link
Member Author

Choose a reason for hiding this comment

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

😑 you're right

Copy link
Member Author

Choose a reason for hiding this comment

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

ok pushing

@runcom runcom force-pushed the remove-job-wait branch 2 times, most recently from 9a68d98 to a8df202 Compare April 9, 2015 23:49
Copy link
Contributor

Choose a reason for hiding this comment

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

Haha, sorry :) I'm sure that test in integration was about daemon restart.

Copy link
Member Author

Choose a reason for hiding this comment

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

killme

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure this test belongs here no more..need suggestion

Copy link
Contributor

Choose a reason for hiding this comment

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

haha no worries it's not easy. If you need to spawn a new daemon, maybe i'd put it in docker_cli_daemon_test.go and rename it so that it starts with TestDaemon.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes thanks @tiborvass

Copy link
Member

Choose a reason for hiding this comment

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

So we're testing that a killed container can have wait called on it after a daemon restart?

Copy link
Member Author

Choose a reason for hiding this comment

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

@cpuguy83 maybe I'm missing something here, could you look at the test that I removed in this pr? I wrote in IRC yestarday and I asked and said ok daemon start, cont start, cont kill, daemon restart, cont wait

Copy link
Contributor

Choose a reason for hiding this comment

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

It is obviously was test for some bug. I can easy imagine when after restart you have corrupted state and wait will hang forever.

@cpuguy83
Copy link
Member

I really don't like this test... I know you just moved it from integration to integration-cli.
But really this seems like a unit test and not an integration test.

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 10, 2015

@runcom Need rebase. Code is ok

Signed-off-by: Antonio Murdaca <me@runcom.ninja>
@runcom
Copy link
Member Author

runcom commented Apr 10, 2015

done

@LK4D4
Copy link
Contributor

LK4D4 commented Apr 10, 2015

LGTM

1 similar comment
@cpuguy83
Copy link
Member

LGTM

cpuguy83 added a commit that referenced this pull request Apr 10, 2015
@cpuguy83 cpuguy83 merged commit 96313f7 into moby:master Apr 10, 2015
@LK4D4
Copy link
Contributor

LK4D4 commented Apr 10, 2015

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants