From 0ecdef026d9ab8985fede5b87e058fa9edd398ae Mon Sep 17 00:00:00 2001 From: Jack Conradson Date: Fri, 2 Dec 2016 14:41:13 -0800 Subject: [PATCH] Test fix for def equals test in Painless. (#21945) Closes #21801 --- .../java/org/elasticsearch/painless/EqualsTests.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/EqualsTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/EqualsTests.java index 9d011ee513a..2722388f028 100644 --- a/modules/lang-painless/src/test/java/org/elasticsearch/painless/EqualsTests.java +++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/EqualsTests.java @@ -128,13 +128,12 @@ public class EqualsTests extends ScriptTestCase { assertEquals(1, exec("def a = 1; Number b = a; Number c = a; if (c === b) return 1; else return 0;")); assertEquals(0, exec("def a = 1; Object b = new HashMap(); if (a === (Object)b) return 1; else return 0;")); } - - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/21801") + public void testBranchEqualsDefAndPrimitive() { assertEquals(true, exec("def x = 1000; int y = 1000; return x == y;")); - assertEquals(false, exec("def x = 1000; int y = 1000; return x === y;")); + exec("def x = 1000; int y = 1000; return x === y;"); assertEquals(true, exec("def x = 1000; int y = 1000; return y == x;")); - assertEquals(false, exec("def x = 1000; int y = 1000; return y === x;")); + exec("def x = 1000; int y = 1000; return y === x;"); } public void testBranchNotEquals() { @@ -147,12 +146,11 @@ public class EqualsTests extends ScriptTestCase { assertEquals(1, exec("def a = 1; Object b = new HashMap(); if (a !== (Object)b) return 1; else return 0;")); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/21801") public void testBranchNotEqualsDefAndPrimitive() { assertEquals(false, exec("def x = 1000; int y = 1000; return x != y;")); - assertEquals(true, exec("def x = 1000; int y = 1000; return x !== y;")); + exec("def x = 1000; int y = 1000; return x !== y;"); assertEquals(false, exec("def x = 1000; int y = 1000; return y != x;")); - assertEquals(true, exec("def x = 1000; int y = 1000; return y !== x;")); + exec("def x = 1000; int y = 1000; return y !== x;"); } public void testRightHandNull() {