@@ -508,8 +508,8 @@ public void testUpdateIndexesOfUnSupportedChangesInTemplate() throws IOException
508
508
final Map <String , Object > idPropMapping = (Map <String , Object >) props .get ("ID" );
509
509
LOGGER .info ("idPropMapping {} " , idPropMapping );
510
510
final Object idPropValue = idPropMapping .get ("ignore_malformed" );
511
- // Verify property mapping parameter was not removed (although mapping update was to remove the ignore_malformed parameter)
512
- assertNotNull ("testUpdateIndexesOfUnSupportedChangesInTemplate" , idPropValue );
511
+ // Verify property mapping parameter was removed
512
+ assertNull ("testUpdateIndexesOfUnSupportedChangesInTemplate" , idPropValue );
513
513
514
514
// Verify index mapping of unsupported field changes has not changed
515
515
@ SuppressWarnings ("unchecked" )
@@ -642,9 +642,9 @@ public void testUpdateIndexesWithNestedFieldChanges() throws IOException, GetInd
642
642
@ SuppressWarnings ("unchecked" )
643
643
final Map <String , Object > gidMapping = (Map <String , Object >) entitiesProps .get ("GRAMMAR_ID" );
644
644
assertNotNull ("testUpdateIndexesOfUnSupportedChangesInTemplate" , gidMapping );
645
- // Verify change to nested property is applied, param added (allowed change)
645
+ // Verify change to nested property is applied, param not added (change not allowed )
646
646
final Object gidProp1 = gidMapping .get ("null_value" );
647
- assertNotNull ("testUpdateIndexesOfUnSupportedChangesInTemplate" , gidProp1 );
647
+ assertNull ("testUpdateIndexesOfUnSupportedChangesInTemplate" , gidProp1 );
648
648
649
649
// Verify index mapping of unsupported field changes to nested property has not changed
650
650
@ SuppressWarnings ("unchecked" )
@@ -778,8 +778,8 @@ public void testAttemptRemoveUnchangeableProperty() throws Exception
778
778
final Map <String , Object > processingProps = (Map <String , Object >) processingPropMapping .get ("properties" );
779
779
@ SuppressWarnings ("unchecked" )
780
780
final Map <String , Object > propIdMapping = (Map <String , Object >) processingProps .get ("ID" );
781
- // Verify param removed (allowed change)
782
- assertFalse (propIdMapping .containsKey ("null_value" ));
781
+ // Verify param not removed (change not allowed )
782
+ assertTrue (propIdMapping .containsKey ("null_value" ));
783
783
@ SuppressWarnings ("unchecked" )
784
784
final Map <String , Object > pTimeMapping = (Map <String , Object >) processingProps .get ("P_TIME" );
785
785
assertNotNull ("testUpdateIndexesOfUnSupportedChangesInTemplate" , pTimeMapping );
@@ -789,9 +789,9 @@ public void testAttemptRemoveUnchangeableProperty() throws Exception
789
789
790
790
@ SuppressWarnings ("unchecked" )
791
791
final Map <String , Object > refMapping = (Map <String , Object >) processingProps .get ("REF" );
792
- // Verify change to nested property is not applied, param not removed
792
+ // Verify change to nested property is applied, param removed
793
793
final Object propIgnoreMalformed = refMapping .get ("ignore_malformed" );
794
- assertNotNull ("testUpdateIndexesOfUnSupportedChangesInTemplate" , propIgnoreMalformed );
794
+ assertNull ("testUpdateIndexesOfUnSupportedChangesInTemplate" , propIgnoreMalformed );
795
795
796
796
@ SuppressWarnings ("unchecked" )
797
797
final Map <String , Object > codeMapping = (Map <String , Object >) processingProps .get ("CODE" );
@@ -862,7 +862,7 @@ public void testRemoveParams() throws Exception
862
862
863
863
@ SuppressWarnings ("unchecked" )
864
864
final Map <String , Object > prop1Mapping = (Map <String , Object >) props .get ("number_two" );
865
- assertTrue (prop1Mapping .containsKey ("coerce" ));
865
+ assertFalse (prop1Mapping .containsKey ("coerce" )); // has been removed, as expected
866
866
867
867
@ SuppressWarnings ("unchecked" )
868
868
final Map <String , Object > prop16Mapping = (Map <String , Object >) props .get ("first_name" );
@@ -886,19 +886,19 @@ public void testRemoveParams() throws Exception
886
886
887
887
@ SuppressWarnings ("unchecked" )
888
888
final Map <String , Object > prop4Mapping = (Map <String , Object >) props .get ("number_one" );
889
- assertTrue (prop4Mapping .containsKey ("ignore_malformed" ));
889
+ assertFalse (prop4Mapping .containsKey ("ignore_malformed" )); // has been removed, as expected
890
890
891
891
@ SuppressWarnings ("unchecked" )
892
892
final Map <String , Object > prop20Mapping = (Map <String , Object >) props .get ("dummy_message2" );
893
- assertFalse (prop20Mapping .containsKey ("index_options" )); // has been removed
893
+ assertTrue (prop20Mapping .containsKey ("index_options" )); // has not been removed, as expected
894
894
895
895
@ SuppressWarnings ("unchecked" )
896
896
final Map <String , Object > prop24Mapping = (Map <String , Object >) props .get ("latency" );
897
897
assertTrue (prop24Mapping .containsKey ("meta" ));
898
898
899
899
@ SuppressWarnings ("unchecked" )
900
900
final Map <String , Object > prop5Mapping = (Map <String , Object >) props .get ("status_code" );
901
- assertFalse (prop5Mapping .containsKey ("null_value" )); // has been removed
901
+ assertTrue (prop5Mapping .containsKey ("null_value" )); // not removed, as expected
902
902
903
903
@ SuppressWarnings ("unchecked" )
904
904
final Map <String , Object > prop27Mapping = (Map <String , Object >) props .get ("names2" );
@@ -1056,19 +1056,19 @@ public void testAddParams() throws Exception
1056
1056
1057
1057
@ SuppressWarnings ("unchecked" )
1058
1058
final Map <String , Object > prop20Mapping = (Map <String , Object >) props .get ("dummy_message2" );
1059
- assertTrue (prop20Mapping .containsKey ("index_options" ));
1059
+ assertFalse (prop20Mapping .containsKey ("index_options" )); // has not been added, as expected
1060
1060
1061
1061
@ SuppressWarnings ("unchecked" )
1062
1062
final Map <String , Object > prop24Mapping = (Map <String , Object >) props .get ("latency" );
1063
1063
assertFalse (prop24Mapping .containsKey ("meta" )); // has not been added
1064
1064
1065
1065
@ SuppressWarnings ("unchecked" )
1066
1066
final Map <String , Object > prop5Mapping = (Map <String , Object >) props .get ("status_code" );
1067
- assertTrue (prop5Mapping .containsKey ("null_value" ));
1067
+ assertFalse (prop5Mapping .containsKey ("null_value" )); // not added, as expected
1068
1068
1069
1069
@ SuppressWarnings ("unchecked" )
1070
1070
final Map <String , Object > prop27Mapping = (Map <String , Object >) props .get ("names2" );
1071
- assertFalse (prop27Mapping .containsKey ("position_increment_gap" )); // has not been added
1071
+ assertFalse (prop27Mapping .containsKey ("position_increment_gap" )); // not added, as expected
1072
1072
1073
1073
@ SuppressWarnings ("unchecked" )
1074
1074
final Map <String , Object > prop28Mapping = (Map <String , Object >) props .get ("manager" );
@@ -1201,25 +1201,25 @@ public void testAddRemoveParams() throws Exception
1201
1201
1202
1202
@ SuppressWarnings ("unchecked" )
1203
1203
final Map <String , Object > prop10Mapping = (Map <String , Object >) propOtherPropsMappings .get ("status_code" );
1204
- assertTrue (prop10Mapping .containsKey ("null_value" )); // added, as expected
1204
+ assertFalse (prop10Mapping .containsKey ("null_value" )); // not added, as expected
1205
1205
1206
1206
@ SuppressWarnings ("unchecked" )
1207
1207
final Map <String , Object > prop11Mapping = (Map <String , Object >) propOtherPropsMappings .get ("BODY_TEXT" );
1208
1208
assertTrue (prop11Mapping .containsKey ("index_prefixes" )); // not removed, as expected
1209
1209
1210
1210
@ SuppressWarnings ("unchecked" )
1211
1211
final Map <String , Object > prop12Mapping = (Map <String , Object >) propOtherPropsMappings .get ("REF" );
1212
- assertTrue (prop12Mapping .containsKey ("ignore_malformed" )); // not removed
1212
+ assertFalse (prop12Mapping .containsKey ("ignore_malformed" )); // removed, as expected
1213
1213
1214
1214
@ SuppressWarnings ("unchecked" )
1215
1215
final Map <String , Object > prop13Mapping = (Map <String , Object >) propOtherPropsMappings .get ("some_date" );
1216
1216
assertFalse (prop13Mapping .containsKey ("format" )); // not added, as expected
1217
1217
1218
1218
@ SuppressWarnings ("unchecked" )
1219
1219
final Map <String , Object > propId = (Map <String , Object >) propProcessingMappings .get ("ID" );
1220
- assertTrue (propId .containsKey ("eager_global_ordinals" )); // added, as expected
1220
+ assertFalse (propId .containsKey ("eager_global_ordinals" )); // not added, unexpected (can be removed but not added?)
1221
1221
assertTrue (propId .containsKey ("ignore_above" ));
1222
- assertFalse (propId .containsKey ("null_value" )); // removed, as expected
1222
+ assertTrue (propId .containsKey ("null_value" )); // not removed, as expected
1223
1223
1224
1224
@ SuppressWarnings ("unchecked" )
1225
1225
final Map <String , Object > propLang = (Map <String , Object >) props .get ("LANGUAGE_CODES" );
0 commit comments