1 package org.simantics.db.tests.api.delayedWrite;
4 import org.simantics.db.Resource;
5 import org.simantics.db.WriteGraph;
6 import org.simantics.db.common.request.DelayedWriteRequest;
7 import org.simantics.db.exception.DatabaseException;
8 import org.simantics.db.testing.annotation.Fails;
9 import org.simantics.db.testing.base.ExistingDatabaseTest;
12 * This originated from Apros issue #3296.
14 * @author Tuukka Lehtonen
16 public class DelayedWriteGraphExceptionHandling extends ExistingDatabaseTest {
19 public void test() throws Exception {
21 DelayedWriteRequest r = new DelayedWriteRequest() {
23 public void perform(WriteGraph graph) throws DatabaseException {
24 // Should throw an exception / error
25 graph.claim(null, null, null, null);
29 } catch (DatabaseException e) {
33 // Just to check the database session is still alive.
34 Resource r = getSession().sync(new org.simantics.db.common.primitiverequest.Resource("http:/"));