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


Java VerificationException类代码示例

本文整理汇总了Java中org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException的典型用法代码示例。如果您正苦于以下问题:Java VerificationException类的具体用法?Java VerificationException怎么用?Java VerificationException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


VerificationException类属于org.apache.tinkerpop.gremlin.process.traversal.strategy.verification包,在下文中一共展示了VerificationException类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: g_V_hasLabelXpersonX_pageRank_byXrankX_byXbothEX_rank_profile

import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException; //导入依赖的package包/类
@Test
@LoadGraphWith(MODERN)
@IgnoreEngine(TraversalEngine.Type.STANDARD)
public void g_V_hasLabelXpersonX_pageRank_byXrankX_byXbothEX_rank_profile() {
    final Traversal<Vertex, TraversalMetrics> traversal = get_g_V_hasLabelXpersonX_pageRank_byXrankX_byXbothEX_rank_profile();
    //printTraversalForm(traversal);
    try {
        traversal.iterate();
        fail("Should have tossed an exception because multi-OLAP is unsolvable");
    } catch (Exception ex) {
        assertTrue(ex instanceof VerificationException || ExceptionUtils.getRootCause(ex) instanceof VerificationException);
    }
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:14,代码来源:ProfileTest.java

示例2: validateForGraphComputer

import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException; //导入依赖的package包/类
private static boolean validateForGraphComputer(final Throwable e) {
    Throwable ex = e;
    while (ex != null) {
        if (ex instanceof VerificationException)
            return true;
        else if (ex instanceof NotSerializableException)
            return true;
        else if (ex.getClass().getSimpleName().contains("ResponseException"))
            return true;
        ex = ex.getCause();
    }
    return false;
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:14,代码来源:GremlinProcessRunner.java

示例3: shouldNeverPropagateANoBulkTraverser

import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException; //导入依赖的package包/类
@Test
@LoadGraphWith
public void shouldNeverPropagateANoBulkTraverser() {
    try {
        assertFalse(g.V().dedup().sideEffect(t -> t.asAdmin().setBulk(0)).hasNext());
        assertEquals(0, g.V().dedup().sideEffect(t -> t.asAdmin().setBulk(0)).toList().size());
        g.V().dedup().sideEffect(t -> t.asAdmin().setBulk(0)).sideEffect(t -> fail("this should not have happened")).iterate();
    } catch (VerificationException e) {
        // its okay if lambdas can't be serialized by the test suite
    }
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:12,代码来源:CoreTraversalTest.java

示例4: shouldNeverPropagateANullValuedTraverser

import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException; //导入依赖的package包/类
@Test
@LoadGraphWith
public void shouldNeverPropagateANullValuedTraverser() {
    try {
        assertFalse(g.V().map(t -> null).hasNext());
        assertEquals(0, g.V().map(t -> null).toList().size());
        g.V().map(t -> null).sideEffect(t -> fail("this should not have happened")).iterate();
    } catch (VerificationException e) {
        // its okay if lambdas can't be serialized by the test suite
    }
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:12,代码来源:CoreTraversalTest.java

示例5: shouldSucceedWithProperTraverserRequirements

import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException; //导入依赖的package包/类
@Test
@LoadGraphWith(MODERN)
public void shouldSucceedWithProperTraverserRequirements() throws Exception {
    final VertexProgramQ vp = VertexProgramQ.build().property("pl").create();
    final Map<String, List<Integer>> expected = new HashMap<>();
    expected.put("vadas", Collections.singletonList(2));
    expected.put("lop", Arrays.asList(2, 2, 2, 3));
    expected.put("josh", Collections.singletonList(2));
    expected.put("ripple", Arrays.asList(2, 3));

    try {
        g.V().repeat(__.out()).emit().program(vp).dedup()
                .valueMap("name", "pl").forEachRemaining((Map<String, Object> map) -> {

            final String name = (String) ((List) map.get("name")).get(0);
            final List<Integer> pathLengths = (List<Integer>) map.get("pl");
            assertTrue(expected.containsKey(name));
            final List<Integer> expectedPathLengths = expected.remove(name);
            assertTrue(expectedPathLengths.containsAll(pathLengths));
            assertTrue(pathLengths.containsAll(expectedPathLengths));
        });

        assertTrue(expected.isEmpty());
    } catch (VerificationException ex) {
        assumeNoException(ex);
    }
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:28,代码来源:GraphComputerTest.java

示例6: shouldFailWithImproperTraverserRequirements

import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException; //导入依赖的package包/类
@Test
@LoadGraphWith(MODERN)
public void shouldFailWithImproperTraverserRequirements() throws Exception {
    final VertexProgramQ vp = VertexProgramQ.build().property("pl").useTraverserRequirements(false).create();
    try {
        g.V().repeat(__.out()).emit().program(vp).dedup()
                .forEachRemaining((Vertex v) -> assertFalse(v.property("pl").isPresent()));
    } catch (VerificationException ex) {
        assumeNoException(ex);
    }
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:12,代码来源:GraphComputerTest.java

示例7: whenAttemptingToMutateViaTraversal_Throw

import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.VerificationException; //导入依赖的package包/类
@Test
public void whenAttemptingToMutateViaTraversal_Throw(){
    expectedException.expect(VerificationException.class);
    expectedException.expectMessage("not read only");
    tx.getTinkerTraversal().V().drop().iterate();
}
 
开发者ID:graknlabs,项目名称:grakn,代码行数:7,代码来源:GraknTxTest.java


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