Search in sources :

Example 36 with PrimitiveLongSet

use of org.neo4j.collection.primitive.PrimitiveLongSet in project neo4j by neo4j.

the class JumpingSequencePutTest method shouldHandlePathologicalSequenceCase.

@Test
public void shouldHandlePathologicalSequenceCase() throws Exception {
    // Given
    PrimitiveLongSet set = Primitive.longSet();
    Sequence seqGen = new Sequence();
    // When
    for (int i = 0; i < 10000; i++) {
        set.add(seqGen.next());
    }
// Then it should not have run out of RAM
}
Also used : PrimitiveLongSet(org.neo4j.collection.primitive.PrimitiveLongSet) Test(org.junit.Test)

Aggregations

PrimitiveLongSet (org.neo4j.collection.primitive.PrimitiveLongSet)36 Test (org.junit.Test)27 PrimitiveLongIterator (org.neo4j.collection.primitive.PrimitiveLongIterator)5 IndexQuery (org.neo4j.kernel.api.schema_new.IndexQuery)5 IndexDefinition (org.neo4j.graphdb.schema.IndexDefinition)4 ReadOperations (org.neo4j.kernel.api.ReadOperations)4 Statement (org.neo4j.kernel.api.Statement)4 NewIndexDescriptor (org.neo4j.kernel.api.schema_new.index.NewIndexDescriptor)4 IOException (java.io.IOException)3 CCVar (apoc.algo.wcc.CCVar)2 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)2 CCResult (apoc.result.CCResult)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 StringReader (java.io.StringReader)1 java.util (java.util)1 Collection (java.util.Collection)1 Collectors (java.util.stream.Collectors)1 Stream (java.util.stream.Stream)1