@@ -747,7 +747,7 @@ func TestAppenderIndexFailedLogging(t *testing.T) {
747747 for i , item := range result .Items {
748748 itemResp := item ["create" ]
749749 itemResp .Index = "an_index"
750- switch i % 3 {
750+ switch i % 4 {
751751 case 0 :
752752 itemResp .Error .Type = "error_type"
753753 itemResp .Error .Reason = "error_reason_even. Preview of field's value: 'abc def ghi'"
@@ -757,6 +757,10 @@ func TestAppenderIndexFailedLogging(t *testing.T) {
757757 case 2 :
758758 itemResp .Error .Type = "unavailable_shards_exception"
759759 itemResp .Error .Reason = "this reason should not be logged"
760+ case 3 :
761+ itemResp .Error .Type = "x_content_parse_exception"
762+ itemResp .Error .Reason = "this reason should not be logged"
763+
760764 }
761765 item ["create" ] = itemResp
762766 }
@@ -772,7 +776,7 @@ func TestAppenderIndexFailedLogging(t *testing.T) {
772776 require .NoError (t , err )
773777 defer indexer .Close (context .Background ())
774778
775- const N = 3 * 2
779+ const N = 4 * 2
776780 for i := 0 ; i < N ; i ++ {
777781 addMinimalDoc (t , indexer , "logs-foo-testing" )
778782 }
@@ -790,6 +794,8 @@ func TestAppenderIndexFailedLogging(t *testing.T) {
790794 assert .Equal (t , int64 (2 ), entries [1 ].Context [0 ].Integer )
791795 assert .Equal (t , "failed to index documents in 'an_index' (unavailable_shards_exception): " , entries [2 ].Message )
792796 assert .Equal (t , int64 (2 ), entries [2 ].Context [0 ].Integer )
797+ assert .Equal (t , "failed to index documents in 'an_index' (x_content_parse_exception): " , entries [3 ].Message )
798+ assert .Equal (t , int64 (2 ), entries [3 ].Context [0 ].Integer )
793799}
794800
795801func TestAppenderRetryLimit (t * testing.T ) {
0 commit comments