package com.gentics.mesh.graphdb.orientdb;

import org.junit.Before;
import org.junit.Test;

import com.syncleus.ferma.DelegatingFramedTransactionalGraph;
import com.syncleus.ferma.FramedTransactionalGraph;
import com.tinkerpop.blueprints.impls.orient.OrientGraph;
import com.tinkerpop.blueprints.impls.orient.OrientGraphFactory;
import com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph;

public class OrientDBFermaMultithreadingReducedTest extends AbstractOrientDBTest {

	OrientTransactionalGraph memoryGraph = new OrientGraph("memory:tinkerpop");
	OrientGraphFactory factory = new OrientGraphFactory("memory:tinkerpop");//.setupPool(5, 100);

	FramedTransactionalGraph fg;

	@Before
	public void setup() {
		fg = new DelegatingFramedTransactionalGraph<>(factory.getTx(), true, false);
	}

	@Test
	public void testMultithreading() {
		runAndWait(() -> {
			Person p = addPersonWithFriends(fg);
			p.setName("joe");
			runAndWait(() -> {
				manipulatePerson(p);
			});
		});
	}

}

package com.gentics.mesh.graphdb.orientdb;

import org.junit.Before;
import org.junit.Test;

import com.syncleus.ferma.DelegatingFramedTransactionalGraph;
import com.syncleus.ferma.FramedTransactionalGraph;
import com.tinkerpop.blueprints.impls.orient.OrientElement;
import com.tinkerpop.blueprints.impls.orient.OrientGraph;
import com.tinkerpop.blueprints.impls.orient.OrientGraphFactory;

public class OrientDBFermaMultithreadingReducedTest extends AbstractOrientDBTest {

	OrientGraphFactory factory = new OrientGraphFactory("memory:tinkerpop");//.setupPool(5, 100);

	FramedTransactionalGraph fg;
	OrientGraph graph;

	@Before
	public void setup() {
		graph = factory.getTx();
		fg = new DelegatingFramedTransactionalGraph<>(graph, true, false);
	}

	@Test
	public void testMultithreading() {
		Person p = addPersonWithFriends(fg);
		p.setName("joe");
		System.out.println(p.getGraph().getClass().getName());

		runAndWait(() -> {
//			graph.getRawGraph().activateOnCurrentThread();
			graph.attach((OrientElement) p.getElement());
			manipulatePerson(p);
		});
	}

}

Remove bogus line