@Override public NodeId allocOffset() { return baseTable.allocOffset() ; }
@Override public NodeId allocOffset() { return nodeTable.allocOffset() ; }
@Override public NodeId allocOffset() { NodeId nodeId = nodeTable.allocOffset() ; info("allocOffset() => "+nodeId) ; return nodeId ; }
protected static void writeBadNode(NodeTable nt, Node badNode) { NodeId id1 = nt.allocOffset() ; try { NodeId nodeId = nt.getAllocateNodeId(badNode) ; fail("Expected exception for bad node: "+badNode) ; } catch (TDBException ex) { } NodeId id2 = nt.allocOffset() ; assertEquals(id1, id2) ; }
protected static void writeBadNode(NodeTable nt, Node badNode) { NodeId id1 = nt.allocOffset() ; try { NodeId nodeId = nt.getAllocateNodeId(badNode) ; fail("Expected exception for bad node: "+badNode) ; } catch (TDBException ex) { } NodeId id2 = nt.allocOffset() ; assertEquals(id1, id2) ; }
@Test public void nodetable_bad_02() { NodeTable nt = createEmptyNodeTable() ; writeNode(nt, "'x'") ; NodeId id1 = nt.allocOffset() ; writeBadNode(nt, badNode1) ; NodeId id2 = nt.allocOffset() ; assertEquals(id1, id2) ; writeNode(nt, "<http://example/x>") ; }
@Test public void nodetable_bad_02() { NodeTable nt = createEmptyNodeTable() ; writeNode(nt, "'x'") ; NodeId id1 = nt.allocOffset() ; writeBadNode(nt, badNode1) ; NodeId id2 = nt.allocOffset() ; assertEquals(id1, id2) ; writeNode(nt, "<http://example/x>") ; }