-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.1.3 server/2.1.3 code: ODatabaseException: Database memory:X is closed during Integration tests #5033
Comments
@lvca please let me know if there is a quick workaround. I had to halt development because now that I have injected the database to all of my classes instead of making a new connection everytime .. my integration tests can't complete.. Thanks |
Hi, |
Hi @Laa, as you can see I even migrated to 2.1.2 server and code and I still have the same issue.. I am trying to replicate it with a small code subset because the integration tests I have are quite a lot. Please let me know if I could provide (and how) more information apart from the the stacktrace. Thanks |
I am also getting those warnings
almost everytime I import and connect to in memory test database I also get this related error:
|
If I use the trick from #3678 (#3678 (comment)) using my own subclass of OrientGraph injecting the logic just before super.addVertex() or super.addEdge is called things are a bit more stable But I still get once in a while stuck tests with that in server console
Or I am getting this warning from time to time:
|
To my surprise I was doing if(graph.isClosed()) { and begin() was one of the reasons throwing exceptions "database X is closed". I think begin() is not clear why is needed.. and how it is possible to reuse a connection object that is shared among multiple objects that will need to be on the same transaction.. Weird things were happening since I was comiting against the different connection while both against the same connection string.. But connection pool should be smart . I feel connection management makes my life more difficult than it should be.. |
|
@Laa @lvca Please don't close those so quickly. I've been fighting this for weeks, refactoring hundreds of places multiple times and it is getting annoying. This problem has to do with OrientDB.. I was able to replicate the problem in this small piece of code (the same happens with shutdown()'s ):
Here is the issue and it happens in random numbef of trials usually before 10th.. I even tried different size of pools and it is replicated every single time.. In this example as I do with my Integration tests I load an in memory database in each loop.. The first trial I get this warning
and then every other trial before the last I get
This is the exception that randomly kills my integration tests
If I remove import and only create empty databases I get:
At the same time in server.bat console I get
Please have a look into that, it really holds me down. Thanks, |
I have integration tests and I have an in memory database that before each test class I import. All the the time I get halfway through my tests (not always the same spot) and I get this message:
even though before returning same OrientGraph object I check if it isClosed() and I do .begin()..without any result.. The exception halts my integration tests and they never finish.. This started happening when I was reusing the same object for all the tests in a class instead of doing new OrientGraph(connString) every time.
In each of my 10+ classes I setup @BeforeClass an in-memory database using this code (:
This is similar to those closed issues #3260, #3678
I even tried OrientGraphFactory factory with a pool size of 10 and get the OrientGraph objects with factory.getTx().. Also made sure to do @after graph.shutdown().. Still the tests are stuck :/
Any help with this?
Thanks
The text was updated successfully, but these errors were encountered: