From: Abbas B. <abb...@en...> - 2013-07-24 07:01:43
|
On Wed, Jul 24, 2013 at 10:00 AM, Ashutosh Bapat < ash...@en...> wrote: > For the sake of everyone's understanding, it would be nice if you can > describe the general structure of JDBC testcases (if there is write-up > available point to it) and description of specific problems. E.g. what is > this build.xml, what does it do? What is the particular problem and so on. > For the general structure of the JDBC test cases please refer to the following links 1. http://jdbc.postgresql.org/index.html 2. http://jdbc.postgresql.org/development/intro.html When we try to run JDBC test suite against XC we face the following problems 1. XC does not support large objects & svaepoints, JDBC driver test suite tests them. 2. XC needs enforce_two_phase_commit to be set to false to create temporary tables. JDBC driver test suite creates temporary tables. 3. XC needs a DISTRIBUTE BY clause to be specified in case the user does not want the default. JDBC driver test suite creates tables and then tries to update their distribution column. We will need to change the distribution of these tables to REPLICATED, in all cases where making such a change does not impact the test itself. There will be other problems too, that we have not yet discovered. I had already provided this info in my previous email with subject "JDBC Regression" dated 13 june 2013. build.xml is the default build file for Apache Ant. JDBC test suite uses Ant which is a Java based build tool. For more details please refer to the following link http://ant.apache.org/manual/using.html For the current patch the problem is that XC does not support large objects and JDBC driver test suite tests large objects. There is not such thing as original expected output file and there is no concept of alternate expected output files hence we decided to skip the test. To skip the test I have added a new configuration parameter in build.xml and then when the test suite was about to test support for large objects I checked that if the configuration parameter is set there is no need to perform this test. To get an idea of how does JDBC driver perform tests, here is a sample test 1. Open a database connection con = TestUtil.openDB(); 2. Create a statement st = con.createStatement(); 3. Perform the operation // Now update image to 9876 and commit st.executeUpdate("update test_a set image=9876 where id=5678"); con.commit(); 4. Confirm the operation rs = st.executeQuery("select image from test_a where id=5678"); assertTrue(rs.next()); assertEquals(9876, rs.getInt(1)); 5. Clean up rs.close(); TestUtil.closeDB(con); For a complete example please take a look at function testTransactions() in file org/postgresql/test/jdbc2/ConnectionTest.java To download the test suite along with the driver please use git clone git://github.com/pgjdbc/pgjdbc.git Regards > > > On Wed, Jul 24, 2013 at 6:34 AM, Abbas Butt <abb...@en...>wrote: > >> Hi, >> PFA the patch. >> It adds another configuration parameter in build.xml to select whether >> the tests are being run for XC. >> If set the tests for unsupported features re skipped. >> >> Comments are welcome. >> >> -- >> *Abbas* >> Architect >> >> Ph: 92.334.5100153 >> Skype ID: gabbasb >> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >> * >> Follow us on Twitter* >> @EnterpriseDB >> >> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >> >> >> ------------------------------------------------------------------------------ >> See everything from the browser to the database with AppDynamics >> Get end-to-end visibility with application monitoring from AppDynamics >> Isolate bottlenecks and diagnose root cause in seconds. >> Start your free trial of AppDynamics Pro today! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Postgres Database Company > -- -- *Abbas* Architect Ph: 92.334.5100153 Skype ID: gabbasb www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> * Follow us on Twitter* @EnterpriseDB Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> |