Package org.neo4j.test

Examples of org.neo4j.test.TestGraphDatabaseFactory


    }

    @Test(timeout = 5000)
    @RepeatRule.Repeat(times = 10)
    public void makeSureDeadlockDoesNotOccur1() throws InterruptedException {
        GraphDatabaseService database = new TestGraphDatabaseFactory()
                .newImpermanentDatabaseBuilder()
                .setConfig(RuntimeKernelExtension.RUNTIME_ENABLED, "true")
                .newGraphDatabase();

        Thread.sleep(random.nextInt(10));
View Full Code Here


    }

    @Test(timeout = 5000)
    @RepeatRule.Repeat(times = 10)
    public void makeSureDeadlockDoesNotOccur2() {
        GraphDatabaseService database = new TestGraphDatabaseFactory()
                .newImpermanentDatabaseBuilder()
                .setConfig(RuntimeKernelExtension.RUNTIME_ENABLED, "true")
                .newGraphDatabase();

        try (Transaction tx = database.beginTx()) {
View Full Code Here

    }

    @Test(timeout = 5000)
    @RepeatRule.Repeat(times = 10)
    public void makeSureDeadlockDoesNotOccur3() {
        GraphDatabaseService database = new TestGraphDatabaseFactory()
                .newImpermanentDatabaseBuilder()
                .setConfig(RuntimeKernelExtension.RUNTIME_ENABLED, "true")
                .newGraphDatabase();

        try (Transaction tx = database.beginTx()) {
View Full Code Here

    }

    @Test(timeout = 5000)
    @RepeatRule.Repeat(times = 10)
    public void makeSureDeadlockDoesNotOccur4() {
        GraphDatabaseService database = new TestGraphDatabaseFactory()
                .newImpermanentDatabaseBuilder()
                .setConfig(RuntimeKernelExtension.RUNTIME_ENABLED, "true")
                .newGraphDatabase();

        try (Transaction tx = database.beginTx()) {
View Full Code Here

    private GraphDatabaseService database;

    @Before
    public void setUp() {
        database = new TestGraphDatabaseFactory().newImpermanentDatabase();
    }
View Full Code Here

    private GraphDatabaseService database;

    @Before
    public void setUp() {
        database = new TestGraphDatabaseFactory().newImpermanentDatabase();
    }
View Full Code Here

*/
public class IncludeBusinessNodesTest {

    @Test
    public void shouldIncludeCorrectRelationships() {
        GraphDatabaseService database = new TestGraphDatabaseFactory().newImpermanentDatabase();

        try (Transaction tx = database.beginTx()) {
            Node n = database.createNode(label("Test"));
            n.setProperty("test", "test");
            Node internal = database.createNode(label(GA_PREFIX + "test"));
View Full Code Here

*/
public class IncludeBusinessRelationshipsTest {

    @Test
    public void shouldIncludeCorrectRelationships() {
        GraphDatabaseService database = new TestGraphDatabaseFactory().newImpermanentDatabase();

        try (Transaction tx = database.beginTx()) {
            Node n1 = database.createNode();
            Node n2 = database.createNode();
            Relationship r = n1.createRelationshipTo(n2, withName("TEST"));
View Full Code Here

    private ExecutionEngine executionEngine;
    private CapturingTransactionEventHandler eventHandler;

    @Before
    public void setUp() {
        database = new TestGraphDatabaseFactory().newImpermanentDatabase();
        executionEngine = new ExecutionEngine(database);
        eventHandler = new CapturingTransactionEventHandler();
        database.registerTransactionEventHandler(eventHandler);
    }
View Full Code Here

            return result;
        }
    }

    private void createTestDatabase() {
        db = new TestGraphDatabaseFactory().newImpermanentDatabase();

        new TestDataBuilder(db)
                .node(label("TestLabel"))
                .node(label("One")).setProp(NAME, "One").setProp(COUNT, 1).setProp(TAGS, new String[]{"one", "two"})
View Full Code Here

TOP

Related Classes of org.neo4j.test.TestGraphDatabaseFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.