@Override protected void onAfterDatabaseCreation(final OrientBaseGraph graph) { System.out.println("Creating graph schema..."); // CREATE BASIC SCHEMA OrientVertexType personClass = graph.createVertexType("Person"); personClass.createProperty("id", OType.STRING); personClass.createProperty("name", OType.STRING); personClass.createProperty("birthday", OType.DATE); personClass.createProperty("children", OType.STRING); OrientVertexType person = graph.getVertexType("Person"); person.createIndex("Person.name", OClass.INDEX_TYPE.UNIQUE, "name"); OrientVertexType customer = graph.createVertexType("Customer", person); customer.createProperty("totalSold", OType.DECIMAL); OrientVertexType provider = graph.createVertexType("Provider", person); provider.createProperty("totalPurchased", OType.DECIMAL); factory = new OrientGraphFactory(graph.getRawGraph().getURL(), "admin", "admin", false); factory.setStandardElementConstraints(false); v = createVertex(graph, 0, 0, 0).getIdentity(); }
protected void onAfterExecution() { final long totalLockExceptions = lockExceptions.get(); if (expectedConcurrentException) Assert.assertTrue("lockExceptions are " + totalLockExceptions, totalLockExceptions > 0); else Assert.assertTrue("lockExceptions are " + totalLockExceptions, totalLockExceptions == 0); factory.close(); }