Skip to content

Commit

Permalink
Adapt test after backport #33634
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczi committed Sep 13, 2018
1 parent e937344 commit 43fe202
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,20 @@ public void testCheckCompatibility() {
modifier.normalizeOther(ft1);
modifier.modify(ft2);
if (modifier.strictOnly) {
String[] conflicts = {
"mapper [foo] is used by multiple types",
"update [" + modifier.property + "]"
};
assertCompatible(modifier.property, ft1, ft2, false);
assertNotCompatible(modifier.property, ft1, ft2, true, conflicts);
assertCompatible(modifier.property, ft2, ft1, false); // always symmetric when not strict
assertNotCompatible(modifier.property, ft2, ft1, true, conflicts);
if (ft1.equals(ft2) == false) {
String[] conflicts = {
"mapper [foo] is used by multiple types",
"update [" + modifier.property + "]"
};
assertNotCompatible(modifier.property, ft2, ft1, true, conflicts);
assertNotCompatible(modifier.property, ft1, ft2, true, conflicts);
} else {
// the modification is no-op so fields are always compatible
assertCompatible(modifier.property, ft1, ft2, true);
assertCompatible(modifier.property, ft2, ft1, true);
}
} else {
// not compatible whether strict or not
String conflict = "different [" + modifier.property + "]";
Expand Down

0 comments on commit 43fe202

Please sign in to comment.