-
Notifications
You must be signed in to change notification settings - Fork 344
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
Make sure to call ctx.cleanup if prepare() fails #389
Conversation
Signed-off-by: Kevin Earls <[email protected]>
@@ -15,7 +16,11 @@ import ( | |||
|
|||
// Cassandra runs a test with Cassandra as the backing storage | |||
func Cassandra(t *testing.T) { | |||
ctx := prepare(t) | |||
ctx, err := prepare(t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we call prepare
in the caller so each test would not have to repeat this block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavolloffay Once I finish the other changes I am making for reporting it will be called in the Setup method, only once per suite. https://github.com/jaegertracing/jaeger-operator/blob/master/test/e2e/all_in_one_test.go#L36-L44
I've run into this bug a few times though, so I wanted to get this done first.
Codecov Report
@@ Coverage Diff @@
## master #389 +/- ##
=======================================
Coverage 89.72% 89.72%
=======================================
Files 64 64
Lines 3094 3094
=======================================
Hits 2776 2776
Misses 216 216
Partials 102 102 Continue to review full report at Codecov.
|
@pavolloffay @objectiser @jpkrohling Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As short term workaround it is fine.
Signed-off-by: Kevin Earls [email protected]
This fixed #388 Currently if tests fail during the prepare() call ctx.cleanup() will not be called and the namespace created for the test does not get cleaned up.