當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。