@Override public void close() { index.close() ; }
@After public void afterTest() { if ( index != null ) index.close(); index = null ; }
@After public void afterTest() { if ( index != null ) index.close(); index = null ; }
@Override public synchronized void close() { // Close once. This may be shared (e.g. triples table and quads table). if ( nodeHashToId != null ) { nodeHashToId.close() ; nodeHashToId = null ; } if ( getObjects() != null ) { getObjects().close() ; objects = null ; } }
public static void randTest(Index index, int maxValue, int numKeys) { if ( numKeys >= 5000 ) System.err.printf("Warning: too many keys\n") ; int[] keys1 = rand(numKeys, 0, maxValue) ; int[] keys2 = permute(keys1) ; try { testInsert(index, keys1); if ( true ) { // Checking tests. testIndexContents(index, keys2); // Test iteration - quite expensive. if ( index instanceof RangeIndex ) testIteration((RangeIndex)index, keys1, 10) ; } testDelete(index, keys2) ; index.close() ; } catch (RuntimeException ex) { System.err.printf("Index : %s\n", index.getClass().getName()) ; System.err.printf("int[] keys1 = {%s} ;\n", strings(keys1)) ; System.err.printf("int[] keys2 = {%s}; \n", strings(keys2)) ; throw ex ; } }
public static void randTest(Index index, int maxValue, int numKeys) { if ( numKeys >= 5000 ) System.err.printf("Warning: too many keys\n") ; int[] keys1 = rand(numKeys, 0, maxValue) ; int[] keys2 = permute(keys1) ; try { testInsert(index, keys1); if ( true ) { // Checking tests. testIndexContents(index, keys2); // Test iteration - quite expensive. if ( index instanceof RangeIndex ) testIteration((RangeIndex)index, keys1, 10) ; } testDelete(index, keys2) ; index.close() ; } catch (RuntimeException ex) { System.err.printf("Index : %s\n", index.getClass().getName()) ; System.err.printf("int[] keys1 = {%s} ;\n", strings(keys1)) ; System.err.printf("int[] keys2 = {%s}; \n", strings(keys2)) ; throw ex ; } }