Derby
  1. Derby
  2. DERBY-3828

Convert jdbcapi/SURTest_ij.sql to JUnit.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.5.1.1
    • Fix Version/s: 10.5.1.1
    • Component/s: Test
    • Labels:
      None
    1. Derby-3828_1.diff
      7 kB
      Erlend Birkenes

      Activity

      Hide
      Myrna van Lunteren added a comment -

      I committed the patch with revision 686238, with the following modifications:

      • the original test ran in suites/jdbcapi.runall, which also ran in derbynetmats. Thus, the test ran both with embedded and network server. I modified the suite of the new test to also run with both embedded and networkserver/DerbyNetClient.
      • the modification to SURTest_ij.sql to include the protocol in the connect statement would have made it impossible for the JSR169/J2ME jvms to run, because the protocol usage causes a call to java.sql.Driver which isn't available with those jvms.
        But, I didn't see anything special about the SURTest database, no properties being set in the _app.properties file, nor in the .sql itself. So I just removed the connect statement from the .sql and adjusted the .out file accordingly.
      • I also removed master/DerbyNetClient/SURTest_ij.out and jdbcapi/SURTest_ij_sed.properties and removed the reference to the old test from suites/DerbyNet.exclude.
      Show
      Myrna van Lunteren added a comment - I committed the patch with revision 686238, with the following modifications: the original test ran in suites/jdbcapi.runall, which also ran in derbynetmats. Thus, the test ran both with embedded and network server. I modified the suite of the new test to also run with both embedded and networkserver/DerbyNetClient. the modification to SURTest_ij.sql to include the protocol in the connect statement would have made it impossible for the JSR169/J2ME jvms to run, because the protocol usage causes a call to java.sql.Driver which isn't available with those jvms. But, I didn't see anything special about the SURTest database, no properties being set in the _app.properties file, nor in the .sql itself. So I just removed the connect statement from the .sql and adjusted the .out file accordingly. I also removed master/DerbyNetClient/SURTest_ij.out and jdbcapi/SURTest_ij_sed.properties and removed the reference to the old test from suites/DerbyNet.exclude.
      Hide
      Erlend Birkenes added a comment -

      Please review and commit this patch

      I just created a new class that runs the script so we can keep it in jdbcapi.
      And I had to adjust the master a tiny bit.

      Added it to jdbcapi/_Suite, removed the old one from suites/jdbcapi.runall and deleted jdbcapi/SURTest_ij_app.properties which isn't needed anymore.

      -Erlend

      Show
      Erlend Birkenes added a comment - Please review and commit this patch I just created a new class that runs the script so we can keep it in jdbcapi. And I had to adjust the master a tiny bit. Added it to jdbcapi/_Suite, removed the old one from suites/jdbcapi.runall and deleted jdbcapi/SURTest_ij_app.properties which isn't needed anymore. -Erlend
      Hide
      Erlend Birkenes added a comment -

      Are there any other scripts that could use a JdbcapiScripts class, or is it just this one?

      If it's only this one I think I'll just move it to lang and be done with it, but if there are other scripts I can make a new class in jdbcapi.

      Show
      Erlend Birkenes added a comment - Are there any other scripts that could use a JdbcapiScripts class, or is it just this one? If it's only this one I think I'll just move it to lang and be done with it, but if there are other scripts I can make a new class in jdbcapi.
      Hide
      Kathey Marsden added a comment -

      Yes, I think it still needs to be converted but this test tests the ij specific syntax like:
      get scroll insensitive cursor sc1 as 'SELECT * FROM t1 FOR UPDATE';

      I think the best thing is to run it as a script as we do in lang.LangScripts, but we don't have anthing setup like that for jdbcapi. Alternatvies are
      1) Move this test over to lang and run it in LangScripts.
      2) Setup a JdbcapiScripts class (similar to LangScripts) and run it there.

      Show
      Kathey Marsden added a comment - Yes, I think it still needs to be converted but this test tests the ij specific syntax like: get scroll insensitive cursor sc1 as 'SELECT * FROM t1 FOR UPDATE'; I think the best thing is to run it as a script as we do in lang.LangScripts, but we don't have anthing setup like that for jdbcapi. Alternatvies are 1) Move this test over to lang and run it in LangScripts. 2) Setup a JdbcapiScripts class (similar to LangScripts) and run it there.
      Hide
      Erlend Birkenes added a comment -

      I opened this because it is one of the last two in jdbcapi.runall, and I noticed afterwards that there already is a jdbcapi/SURTest..

      Should this still be converted?

      Show
      Erlend Birkenes added a comment - I opened this because it is one of the last two in jdbcapi.runall, and I noticed afterwards that there already is a jdbcapi/SURTest.. Should this still be converted?

        People

        • Assignee:
          Erlend Birkenes
          Reporter:
          Erlend Birkenes
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development