File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
exporter/elasticsearchexporter Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,17 @@ func TestComponentStatus(t *testing.T) {
52
52
require .Fail (t , "LogRoundTrip with an http error code should report a recoverable error status" )
53
53
}
54
54
55
+ // Pass in a 409 (duplicate document) and make sure it doesn't report a new status
56
+ _ = esLogger .LogRoundTrip (
57
+ & http.Request {URL : & url.URL {}},
58
+ & http.Response {StatusCode : http .StatusConflict , Status : "409 duplicate" },
59
+ nil , time .Now (), 0 )
60
+ select {
61
+ case <- statusChan :
62
+ assert .Fail (t , "LogRoundTrip with a 409 should not change the component status" )
63
+ default :
64
+ }
65
+
55
66
// Pass in an http success status and make sure the component status returns to OK
56
67
_ = esLogger .LogRoundTrip (
57
68
& http.Request {URL : & url.URL {}},
You can’t perform that action at this time.
0 commit comments