orientechnologies / orientdb-gremlin

TinkerPop3 Graph Structure Implementation for OrientDB
Apache License 2.0
93 stars 32 forks source link

Transaction Handling, Cleanup, Minor fix #17

Closed Jotschi closed 9 years ago

Jotschi commented 9 years ago

The main change is that i added OrientGraphFactory.getTx() and the needed classes.

I'll add additional information to #16

velo commented 9 years ago

Hey, update OrientGraphFeatures to include transaction...

That will kick more tests =D

velo commented 9 years ago

can you merge with new master? now we do have travis CI enabled

velo commented 9 years ago

BTW, do you have integration tests numbers?

Tests run: 776, Failures: 33, Errors: 178, Skipped: 261
mpollmeier commented 9 years ago

thanks @Jotschi - looking great as @velo said, can you please merge master in (there's a conflict in the pom.xml) and we'll get this merged.

Jotschi commented 9 years ago

@mpollmeier I have just rebased my commits

velo commented 9 years ago

The build failed...

testGraphTransactionOnNoTrxOrientGraph(org.apache.tinkerpop.gremlin.orientdb.OrientGraphTest)  Time elapsed: 0.011 sec  <<< ERROR!
java.lang.Exception: Unexpected exception, expected<java.lang.RuntimeException> but was<java.lang.AssertionError>
Jotschi commented 9 years ago

@velo I have now added another flag which is used to indicate that the created graph is a noTx graph. In those cases .tx() usage is pretty much very useless since all operations on the graph are atomic. The current BP implementation of orientdb also supports commit and rolllback on noTx graph instances but those calls are basically ignored. I implemented this in a similar fashion.

Alternatively an exception could be thrown to indicate to the user that transaction usage is not supported when using noTx. I have not implemented that alternative. Let me know what you think.

mpollmeier commented 9 years ago

Do you guys have an idea how to fix the test failures?

When I run tests locally using mvn install it stalls after some time. The last output I get is this. I increased maven's heap space, no difference.

Running org.apache.tinkerpop.gremlin.orientdb.gremlintest.structure.OrientGraphStructureStandardIT
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at JPLISAgent.c line: 844

Note that mvn test doesn't run all tests.

velo commented 9 years ago

@mpollmeier integration tests are "safe" to ignore for now... since we agreed that until they are 100% ok is ok to be x% brokne =D

mpollmeier commented 9 years ago

in that case I have no idea what travis is complaining about. if I run mvn test i get no failures

Jotschi commented 9 years ago

@velo @mpollmeier Tests are now green.