当前位置: 首页>>代码示例>>Java>>正文


Java RandomizedTest.assumeFalse方法代码示例

本文整理汇总了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());
}
 
开发者ID:europeana,项目名称:search,代码行数:20,代码来源:WithNestedTests.java

示例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
  );
}
 
开发者ID:europeana,项目名称:search,代码行数:19,代码来源:TestSolr4Spatial.java

示例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
  );
}
 
开发者ID:pkarmstr,项目名称:NYBC,代码行数:18,代码来源:TestSolr4Spatial.java

示例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);
}
 
开发者ID:europeana,项目名称:search,代码行数:12,代码来源:TestLeaveFilesIfTestFails.java

示例5: assumeFalse

import com.carrotsearch.randomizedtesting.RandomizedTest; //导入方法依赖的package包/类
public static void assumeFalse(String msg, boolean condition) {
  RandomizedTest.assumeFalse(msg, condition);
}
 
开发者ID:europeana,项目名称:search,代码行数:4,代码来源:LuceneTestCase.java


注:本文中的com.carrotsearch.randomizedtesting.RandomizedTest.assumeFalse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。