I've made those changes and they seem to resolve the issue for me both on Java 6 and Java 7.
Will commit the change shortly Rob On 26/12/2013 11:56, "Andy Seaborne" <[email protected]> wrote: >Rob, > >I can't reliably run the JDBC tests reliably on my local machine but I >think I know what's going on. > >The tests freeze up and the suite never finishes at >oaj.jdbc.mem.connections.TestDatasetConnection. > >When I get it it fail, it is always in this test: >AbstractJenaConnectionTests.connection_statement_query_construct_timeout_0 >2() > > >It happens with java7 with maven from the command line but not java6 >(OpenJDK or sun). In Eclipse, with Java6, it can lock up as well. The >version of maven does not affect it. I am not seeing the problem we had >before where there were huge numbers of TCP connections waiting to get >cleaned up by the kernel. There is no significant CPU being used. > >Reducing the test data size and it terminates with "no exception" as >expected. As set up, I think it will fail after 30 hours but I haven't >waited that long. > >Poking at the test, adding debug statements, I have seen the >SQLException only occur at point of stmt.executeQuery, and the test >works OK. I have not see an SQLException from the rset.next() loop. > >What seems to be happening is that the query executes quite quickly >sometimes, no timeout, and then the results materialized by >JenaStatement (it's of type ResultSet.TYPE_SCROLL_INSENSITIVE). > >After this, there is no opportunity for the query to timeout - it's >finished. Looping on rset.next is not pulling results because in this >test, the result are materialized at the start. > >Possible fix: >1/ Add a delay FILTER(<http://jena.hpl.hp.com/ARQ/function#wait>(1000)) >to make sure the query is slow enough. > >2/ Consider what this test is actually testing because the results are >materialised by stmt.executeQuery when ResultSet.TYPE_SCROLL_INSENSITIVE. > >See also connection_statement_query_select_timeout_02 >which has a 3-way cross product, not a 2-way one. > > > Andy
