Skip two Painless branch tests on Windows

This commit skips the two Painless tests
EqualsTests#testBranchEqualsDefAndPrimitive and
EqualsTests#testBranchNotEqualsDefAndPrimitive on Windows as the tests
are repeatedly failing there.
This commit is contained in:
Jason Tedor 2017-04-11 06:19:42 -04:00
parent 88a54f14c7
commit 653619079c
1 changed files with 8 additions and 4 deletions

View File

@ -19,6 +19,8 @@ package org.elasticsearch.painless;
* under the License.
*/
import org.apache.lucene.util.Constants;
// TODO: Figure out a way to test autobox caching properly from methods such as Integer.valueOf(int);
public class EqualsTests extends ScriptTestCase {
public void testTypesEquals() {
@ -130,10 +132,11 @@ public class EqualsTests extends ScriptTestCase {
}
public void testBranchEqualsDefAndPrimitive() {
assumeFalse("test fails on Windows", Constants.WINDOWS);
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 x === y;"));
assertEquals(true, exec("def x = 1000; int y = 1000; return y == x;"));
exec("def x = 1000; int y = 1000; return y === x;");
assertEquals(false, exec("def x = 1000; int y = 1000; return y === x;"));
}
public void testBranchNotEquals() {
@ -147,10 +150,11 @@ public class EqualsTests extends ScriptTestCase {
}
public void testBranchNotEqualsDefAndPrimitive() {
assumeFalse("test fails on Windows", Constants.WINDOWS);
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 x !== y;"));
assertEquals(false, exec("def x = 1000; int y = 1000; return y != x;"));
exec("def x = 1000; int y = 1000; return y !== x;");
assertEquals(true, exec("def x = 1000; int y = 1000; return y !== x;"));
}
public void testRightHandNull() {