-
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
Fix race condition in test, remove hard-coded namespace #382
Conversation
Signed-off-by: Kevin Earls <kearls@redhat.com>
Codecov Report
@@ Coverage Diff @@
## master #382 +/- ##
=======================================
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 |
test/e2e/smoketest.go
Outdated
if !strings.Contains(bodyString, "errors\":null") { | ||
if (strings.Contains(bodyString, tStr)) { | ||
return true, nil | ||
} else if !strings.Contains(bodyString, "errors\":null") { |
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.
Keep the errors check separate from the expected spas and move it above it
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 Are you ok with these changes?
Signed-off-by: Kevin Earls <kearls@redhat.com>
@@ -45,10 +45,10 @@ func SmokeTest(apiTracesEndpoint, collectorEndpoint, serviceName string, interva | |||
|
|||
if !strings.Contains(bodyString, "errors\":null") { |
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.
Can be written as
if !strings.Contains(bodyString, "errors\":null") {
return false, errors.New("query service returns errors")
}
return strings.Contains(bodyString, tStr)), nil
Signed-off-by: Kevin Earls <kearls@redhat.com>
Signed-off-by: Kevin Earls kearls@redhat.com
This fixes #380 where the test would fail if we did the http get before the span got flushed. I've also removed the hardcoded namespace of "default" from the es_index_cleaner_test.