Derby
  1. Derby
  2. DERBY-2134

Add long running System test for Derby

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.2.1.6
    • Fix Version/s: 10.2.2.1
    • Component/s: Test
    • Labels:
      None
    • Issue & fix info:
      Patch Available

      Description

      I will use this place to add 2 long running system tests for Derby.

      1. Scenario.zip
        5.54 MB
        Manjula Kutty
      2. Sttest.zip
        995 kB
        Manjula Kutty

        Issue Links

          Activity

          Hide
          Manjula Kutty added a comment -

          The intention of this jira issue was to act as a place holder for the system test contribution. I will open another jira issue to address the post commit tasks.

          Show
          Manjula Kutty added a comment - The intention of this jira issue was to act as a place holder for the system test contribution. I will open another jira issue to address the post commit tasks.
          Hide
          Myrna van Lunteren added a comment -

          I committed the files with revision 501639. See http://svn.apache.org/viewvc?view=rev&revision=501639.

          I made the following changes from the original files attached to this issue:

          • renamed the scenario package to mailjdbc; incl. renaming of references within the .java files
          • jar-ed up the .txt and .jpg files for scenario test into a Resource.jar, and placed this jar in a subdirectory data (i.e. java/testing/org/apache/derbyTesting/system/mailjdbc/data)
          • moved the sttest resource.jar into java/testing/org/apache/derbyTesting/system/sttest/data
          • modified Readme.txt of scenario.zip to README.txt to match the case of the one in sttest.zip
          • added License headers to the README.txt files
          • moved README.txt files down to java/testing/org/apache/derbyTesting/system/sttest and mailjdbc
          • changed NetworkServer url in mailjdbc/utils/DbTasks.java to have REFRESH/Refresh as user/password combination instead of admin,admin.
          • made a few tiny trivial editing changes in the README.txt files.
          • moved (scenario)/derby.properties to java/testing/org/apache/derbyTesting/system/mailjdbc

          I have not actually attempted to build and run the tests in their new spot.

          What is left to do:
          0. Ensure all still works.
          1. Add build.xml files.
          2. improve the README.txt files so the tests can be run 'out of the box'. They need to get adjusted for the location of the resource.jar, and derby.properties.
          3. Generate the txt and blobs dynamically
          4. Remove unwanted prints to sttest output
          5. create backup directory relative to the current working dir

          Show
          Myrna van Lunteren added a comment - I committed the files with revision 501639. See http://svn.apache.org/viewvc?view=rev&revision=501639 . I made the following changes from the original files attached to this issue: renamed the scenario package to mailjdbc; incl. renaming of references within the .java files jar-ed up the .txt and .jpg files for scenario test into a Resource.jar, and placed this jar in a subdirectory data (i.e. java/testing/org/apache/derbyTesting/system/mailjdbc/data) moved the sttest resource.jar into java/testing/org/apache/derbyTesting/system/sttest/data modified Readme.txt of scenario.zip to README.txt to match the case of the one in sttest.zip added License headers to the README.txt files moved README.txt files down to java/testing/org/apache/derbyTesting/system/sttest and mailjdbc changed NetworkServer url in mailjdbc/utils/DbTasks.java to have REFRESH/Refresh as user/password combination instead of admin,admin. made a few tiny trivial editing changes in the README.txt files. moved (scenario)/derby.properties to java/testing/org/apache/derbyTesting/system/mailjdbc I have not actually attempted to build and run the tests in their new spot. What is left to do: 0. Ensure all still works. 1. Add build.xml files. 2. improve the README.txt files so the tests can be run 'out of the box'. They need to get adjusted for the location of the resource.jar, and derby.properties. 3. Generate the txt and blobs dynamically 4. Remove unwanted prints to sttest output 5. create backup directory relative to the current working dir
          Show
          Jean T. Anderson added a comment - This code is cleared for import. Incubator notice: http://mail-archives.apache.org/mod_mbox/incubator-general/200701.mbox/%3c45A5BF4D.6010805@bristowhill.com%3e Result: http://www.nabble.com/-RESULT--IP-CLEARANCE--IBM-contribution-to-Apache-Derby-p8380114.html
          Hide
          Jean T. Anderson added a comment -

          Actually, changes can be made initially by whomever commits the contribution, after the process to accept the contribution has completed. I'll close the vote [1] to accept on Wednesday January 10, then will notify the Incubator. I doubt there will be any objections, so the code can be committed as early as Saturday, January 13 (according to [2], we only have to wait 48 hours for a -1).

          [1] http://mail-archives.apache.org/mod_mbox/db-derby-dev/200701.mbox/%3c459C03C8.40600@apache.org%3e
          [2] http://incubator.apache.org/ip-clearance/ip-clearance-template.html

          Show
          Jean T. Anderson added a comment - Actually, changes can be made initially by whomever commits the contribution, after the process to accept the contribution has completed. I'll close the vote [1] to accept on Wednesday January 10, then will notify the Incubator. I doubt there will be any objections, so the code can be committed as early as Saturday, January 13 (according to [2] , we only have to wait 48 hours for a -1). [1] http://mail-archives.apache.org/mod_mbox/db-derby-dev/200701.mbox/%3c459C03C8.40600@apache.org%3e [2] http://incubator.apache.org/ip-clearance/ip-clearance-template.html
          Hide
          Manjula Kutty added a comment -

          Thanks for all the comments received so far.

          Yes we can change the name from Scenario to MailclientApp or something similar. Also for the test to run in networkserver mode , the test will run fine if the user name fis Refresh. I will fix this problem once the files are committed. I can change the existing backupdb location to a location relative to the current directory. Again I can make this changes only after the files are committed. Also I can refine the output generated for sttest.

          Show
          Manjula Kutty added a comment - Thanks for all the comments received so far. Yes we can change the name from Scenario to MailclientApp or something similar. Also for the test to run in networkserver mode , the test will run fine if the user name fis Refresh. I will fix this problem once the files are committed. I can change the existing backupdb location to a location relative to the current directory. Again I can make this changes only after the files are committed. Also I can refine the output generated for sttest.
          Hide
          John H. Embretsen added a comment -

          Sttest and Scenario look like useful additions to the collection of Derby tests. I agree with the proposal to change the name of Scenario. The main class is called "MailJdbc" - perhaps this can be used as a test name unless someone comes up with a better name? Or "mailclient" (works better as a package name than "mailjdbc")...

          I'm not sure what kind of comments are expected in this Jira issue - maybe implementation issues should wait until it has been committed? Anyway, I encountered a couple of issues when trying to run the tests in both embedded and client/server modes:

          Sttest:

          • Generated an awful lot of output. I ran the test for about 1 hr, and the output file was 4 MB (most of which was lines such as "t1 inserted row with id 685055955"). There should be a way to tune the amount of output...

          Scenario:

          • Tries to write backup DB to the "/Scenario/mailbackup/" directory. I think this would not work on most systems unless you run (unix) as root. Should be more generic and configurable.
          • The readme says "Make the appropriate changes for derby client or jcc , if you are testing the netWorkServer". I'm not sure what these changes should be, but here's a couple of issues I had using the client driver and the supplied derby.properties file:
          • The test was not able to create the schema due to authentication failures. When I added the user "admin" to the property file, this worked.
          • After doing the above, I got exceptions saying "Schema 'REFRESH' does not exist". I did not investigate further.
          Show
          John H. Embretsen added a comment - Sttest and Scenario look like useful additions to the collection of Derby tests. I agree with the proposal to change the name of Scenario. The main class is called "MailJdbc" - perhaps this can be used as a test name unless someone comes up with a better name? Or "mailclient" (works better as a package name than "mailjdbc")... I'm not sure what kind of comments are expected in this Jira issue - maybe implementation issues should wait until it has been committed? Anyway, I encountered a couple of issues when trying to run the tests in both embedded and client/server modes: Sttest: Generated an awful lot of output. I ran the test for about 1 hr, and the output file was 4 MB (most of which was lines such as "t1 inserted row with id 685055955"). There should be a way to tune the amount of output... Scenario: Tries to write backup DB to the "/Scenario/mailbackup/" directory. I think this would not work on most systems unless you run (unix) as root. Should be more generic and configurable. The readme says "Make the appropriate changes for derby client or jcc , if you are testing the netWorkServer". I'm not sure what these changes should be, but here's a couple of issues I had using the client driver and the supplied derby.properties file: The test was not able to create the schema due to authentication failures. When I added the user "admin" to the property file, this worked. After doing the above, I got exceptions saying "Schema 'REFRESH' does not exist". I did not investigate further.
          Hide
          Daniel John Debrunner added a comment -

          I think the 'scenario' test could have a better name in its final resting place in the tree, it's a very general name.
          Maybe some short name that could stand for 'email client test'.

          Another possible improvement in the future would be to generate the text and images (BLOBs) dynamically rather than having 5-20Mb of test data checked into the code line.

          Show
          Daniel John Debrunner added a comment - I think the 'scenario' test could have a better name in its final resting place in the tree, it's a very general name. Maybe some short name that could stand for 'email client test'. Another possible improvement in the future would be to generate the text and images (BLOBs) dynamically rather than having 5-20Mb of test data checked into the code line.
          Hide
          Andrew McIntyre added a comment -

          A couple of minor notes:

          • the files in the top level of each zip file should be moved into the test level package, e.g. Resource.jar in sttest should be moved into org/apache/derbyTesting/system/sttest. The files at the top level in the Scenario zip should be moved similarly, and considering their size, they should probably also be put into a jar file to conserve space and bandwidth. Jarring them up reduced the total size from 20MB to 5MB.
          • the new packages will need buildfiles and then get hooked into the java/testing build file.

          These can be addressed after the files are committed.

          Show
          Andrew McIntyre added a comment - A couple of minor notes: the files in the top level of each zip file should be moved into the test level package, e.g. Resource.jar in sttest should be moved into org/apache/derbyTesting/system/sttest. The files at the top level in the Scenario zip should be moved similarly, and considering their size, they should probably also be put into a jar file to conserve space and bandwidth. Jarring them up reduced the total size from 20MB to 5MB. the new packages will need buildfiles and then get hooked into the java/testing build file. These can be addressed after the files are committed.
          Hide
          Jean T. Anderson added a comment -

          The software grant form that IBM faxed for this contribution has been recorded by the ASF secretary. I'll call a vote to accept the contribution.

          Show
          Jean T. Anderson added a comment - The software grant form that IBM faxed for this contribution has been recorded by the ASF secretary. I'll call a vote to accept the contribution.
          Hide
          Manjula Kutty added a comment -

          The Sttest.zip file has the source files and other datafiles to run the system test called Single Table test. It also includes a readme file which will give you an idea about the test and also how to run the test.

          The Scenario.zip file has the source files and other datafiles to run the Scenario test. This file also has the readme file which will help you to get an idea about the whole test and how to run the test.

          Show
          Manjula Kutty added a comment - The Sttest.zip file has the source files and other datafiles to run the system test called Single Table test. It also includes a readme file which will give you an idea about the test and also how to run the test. The Scenario.zip file has the source files and other datafiles to run the Scenario test. This file also has the readme file which will help you to get an idea about the whole test and how to run the test.
          Hide
          Rick Hillegas added a comment -

          Reassigning to 10.2.3.0.

          Show
          Rick Hillegas added a comment - Reassigning to 10.2.3.0.

            People

            • Assignee:
              Manjula Kutty
              Reporter:
              Manjula Kutty
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development