本文整理汇总了Java中com.carrotsearch.randomizedtesting.RandomizedTest.assumeFalse方法的典型用法代码示例。如果您正苦于以下问题:Java RandomizedTest.assumeFalse方法的具体用法?Java RandomizedTest.assumeFalse怎么用?Java RandomizedTest.assumeFalse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.carrotsearch.randomizedtesting.RandomizedTest
的用法示例。
在下文中一共展示了RandomizedTest.assumeFalse方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: before
import com.carrotsearch.randomizedtesting.RandomizedTest; //导入方法依赖的package包/类
protected void before() throws Throwable {
if (!isPropertyEmpty(SysGlobals.SYSPROP_TESTFILTER()) ||
!isPropertyEmpty(SysGlobals.SYSPROP_TESTCLASS()) ||
!isPropertyEmpty(SysGlobals.SYSPROP_TESTMETHOD()) ||
!isPropertyEmpty(SysGlobals.SYSPROP_ITERATIONS())) {
// We're running with a complex test filter that is properly handled by classes
// which are executed by RandomizedRunner. The "outer" classes testing LuceneTestCase
// itself are executed by the default JUnit runner and would be always executed.
// We thus always skip execution if any filtering is detected.
Assume.assumeTrue(false);
}
// Check zombie threads from previous suites. Don't run if zombies are around.
RandomizedTest.assumeFalse(RandomizedRunner.hasZombieThreads());
TestRuleIgnoreAfterMaxFailures newRule = new TestRuleIgnoreAfterMaxFailures(Integer.MAX_VALUE);
prevRule = LuceneTestCase.replaceMaxFailureRule(newRule);
RandomizedTest.assumeFalse(FailureMarker.hadFailures());
}
示例2: testSortMultiVal
import com.carrotsearch.randomizedtesting.RandomizedTest; //导入方法依赖的package包/类
@Test
public void testSortMultiVal() throws Exception {
RandomizedTest.assumeFalse("Multivalue not supported for this field",
fieldName.equals("pointvector") || fieldName.equals("bbox"));
assertU(adoc("id", "100", fieldName, "1,2"));//1 point
assertU(adoc("id", "101", fieldName, "4,-1", fieldName, "3,5"));//2 points, 2nd is pretty close to query point
assertU(commit());
assertJQ(req(
"q", radiusQuery(3, 4, 9, "distance", null),
"fl","id,score",
"sort","score asc")//want ascending due to increasing distance
, 1e-4
, "/response/docs/[0]/id=='101'"
, "/response/docs/[0]/score==0.99862987"//dist to 3,5
);
}
示例3: testSortMultiVal
import com.carrotsearch.randomizedtesting.RandomizedTest; //导入方法依赖的package包/类
@Test
public void testSortMultiVal() throws Exception {
RandomizedTest.assumeFalse("Multivalue not supported for this field", fieldName.equals("pointvector"));
assertU(adoc("id", "100", fieldName, "1,2"));//1 point
assertU(adoc("id", "101", fieldName, "4,-1", fieldName, "3,5"));//2 points, 2nd is pretty close to query point
assertU(commit());
assertJQ(req(
"q", "{! score=distance}"+fieldName +":\"Intersects(Circle(3,4 d=9))\"",
"fl","id,score",
"sort","score asc")//want ascending due to increasing distance
, 1e-4
, "/response/docs/[0]/id=='101'"
, "/response/docs/[0]/score==0.99862987"//dist to 3,5
);
}
示例4: testWindowsUnremovableFile
import com.carrotsearch.randomizedtesting.RandomizedTest; //导入方法依赖的package包/类
@Test
public void testWindowsUnremovableFile() throws IOException {
RandomizedTest.assumeTrue("Requires Windows.", Constants.WINDOWS);
RandomizedTest.assumeFalse(LuceneTestCase.LEAVE_TEMPORARY);
Result r = JUnitCore.runClasses(Nested2.class);
Assert.assertEquals(1, r.getFailureCount());
Nested2.openFile.close();
TestUtil.rm(Nested2.parent);
}
示例5: assumeFalse
import com.carrotsearch.randomizedtesting.RandomizedTest; //导入方法依赖的package包/类
public static void assumeFalse(String msg, boolean condition) {
RandomizedTest.assumeFalse(msg, condition);
}