the erase operation is blocking - that is, the servlet will never finish unless the underlying JDBC calls have returned. However, I cannot guarantee that some of the operations actually performed by the underlying DB are performed in a blocking manner.
If you know of a way to force the underlying DBs to perform all the operations in a blocking manner, I'd be happy to learn.
As to the timeouts - sometimes, for reasons not known to me, cleaning the DB takes a very, very long time. (Minutes. I have experienced this with DB2 and MSSQL.) The servlet should, however, always wait for the JBDS calls to return.
I'm thinking that relying on the REST service for cleanup is a bad idea. Steve Ebersole, you mentioned using a schema name purely for the test suite. Can we think through that? Off the top of my head, here's one idea:
All of QA's DBAllocator instances include a "db.schema" value in the generated hibernate.properties, so we could certainly use that. What difficulties can you think of with simply trying to use JDBC to drop all tables within the given schema after each test class run?
|