@@ -49,10 +49,6 @@ private static <K, V> Map<K, V> newHashMap(K key, V value) {
49
49
return map ;
50
50
}
51
51
52
- private static <K , V > Map <K , V > emptyMutableHashMap () {
53
- return new HashMap <>(0 );
54
- }
55
-
56
52
public void testGetPipeline () {
57
53
PipelineConfiguration pipelineConfiguration = new PipelineConfiguration ("pipeline1" , new BytesArray ("""
58
54
{"processors": [{"processor1" : {}}]}""" ), XContentType .JSON );
@@ -130,14 +126,14 @@ public void testRethrowingOfElasticParseExceptionFromProcessors() {
130
126
{"processors": []}""" ), XContentType .JSON );
131
127
final IngestMetadata ingestMetadata = new IngestMetadata (Map .of ("pipeline1" , pipelineConfiguration ));
132
128
final Processor .Factory factoryThatThrowsElasticParseException = (factory , tag , description , config , projectId ) -> {
133
- throw new ElasticsearchParseException ("house: it's never lupus " );
129
+ throw new ElasticsearchParseException ("exception to be caught " );
134
130
};
135
131
final Map <String , Processor .Factory > processors = Map .of ("parse_exception_processor" , factoryThatThrowsElasticParseException );
136
132
final var projectId = randomProjectIdOrDefault ();
137
133
IngestService ingestService = createWithProcessors (projectId , processors );
138
134
ingestService .innerUpdatePipelines (projectId , ingestMetadata );
139
135
SimulateBulkRequest simulateBulkRequest = new SimulateBulkRequest (
140
- newHashMap ("pipeline1" , newHashMap ("processors" , List .of (Map .of ("parse_exception_processor" , emptyMutableHashMap ( ))))),
136
+ newHashMap ("pipeline1" , newHashMap ("processors" , List .of (Map .of ("parse_exception_processor" , new HashMap <>( 0 ))))),
141
137
Map .of (),
142
138
Map .of (),
143
139
Map .of ()
@@ -147,7 +143,7 @@ public void testRethrowingOfElasticParseExceptionFromProcessors() {
147
143
ElasticsearchParseException .class ,
148
144
() -> new SimulateIngestService (ingestService , simulateBulkRequest )
149
145
);
150
- assertThat (ex .getMessage (), is ("house: it's never lupus " ));
146
+ assertThat (ex .getMessage (), is ("exception to be caught " ));
151
147
}
152
148
153
149
private static IngestService createWithProcessors (ProjectId projectId , Map <String , Processor .Factory > processors ) {
0 commit comments