Derby
  1. Derby
  2. DERBY-1318

Add an upgrade test to verify that DataSources can be serialized by the previous release and then correctly deserialized by the current release

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.2.1.6
    • Fix Version/s: 10.4.2.0
    • Component/s: JDBC, Test
    • Urgency:
      Normal

      Description

      Currently, our DataSources are serializable in order to play well with JNDI. However, we have no upgrade test verifying that DataSource serialization works across release boundaries. We should add this case to our upgrade tests.

      Further recommendations by Dan:

      "I do think though that upgrade testing recently brought into the mainline by Deepa should be enhanced to test:

      • serializing Derby''s data source implementations in 10.1 and seeing it unserializes with 10.2
        (maybe into a BLOB column)
      • making a Reference object out of Derby''s data source implementations in 10.1 and making it into
        an object with 10.2. (if this type of tetsing makes sense for References')"
      1. derby-1318-1a-for_comments.diff
        37 kB
        Kristian Waagan
      2. derby-1318-1a-for_comments.stat
        4 kB
        Kristian Waagan
      3. derby-1318-1b-for_comments.diff
        36 kB
        Kristian Waagan
      4. derby-1318-1b-for_comments.stat
        3 kB
        Kristian Waagan
      5. serialized-data-sources.zip
        16 kB
        Kristian Waagan
      6. derby-1318-2a-javadoc_and_build.diff
        3 kB
        Kristian Waagan

        Activity

        Hide
        Myrna van Lunteren added a comment -

        I see a test has been submitted. Perhaps this can be closed as fixed?

        Show
        Myrna van Lunteren added a comment - I see a test has been submitted. Perhaps this can be closed as fixed?
        Hide
        Dyre Tjeldvoll added a comment -

        Removing Fix-version for unassigned issues

        Show
        Dyre Tjeldvoll added a comment - Removing Fix-version for unassigned issues
        Hide
        Kristian Waagan added a comment -

        'derby-1318-2a-javadoc_and_build.diff' fixes some JavaDoc errors and also makes the utility class SerializeDataSources be built and included in derbyTesting.jar.
        Committed to trunk with revision 628482.

        Show
        Kristian Waagan added a comment - 'derby-1318-2a-javadoc_and_build.diff' fixes some JavaDoc errors and also makes the utility class SerializeDataSources be built and included in derbyTesting.jar. Committed to trunk with revision 628482.
        Hide
        Kristian Waagan added a comment -

        Committed 'derby-1318-1b-for_comments.diff' (and 'serialized-data-sources.zip') to trunk with revision 627356.

        Show
        Kristian Waagan added a comment - Committed 'derby-1318-1b-for_comments.diff' (and 'serialized-data-sources.zip') to trunk with revision 627356.
        Hide
        Kristian Waagan added a comment -

        'derby-1318-1b-for_comments.diff' is a slightly changed from 1a:

        • uses more specific versions (for instance 10.3.2.1 instead of 10.3)
        • improved documentation slightly
        • added a read method to SerializeDataSource.java, which prints information about the specified file.

        Also added the serialized data source files, which are not included in the diff because they are binary files.

        Show
        Kristian Waagan added a comment - 'derby-1318-1b-for_comments.diff' is a slightly changed from 1a: uses more specific versions (for instance 10.3.2.1 instead of 10.3) improved documentation slightly added a read method to SerializeDataSource.java, which prints information about the specified file. Also added the serialized data source files, which are not included in the diff because they are binary files.
        Hide
        Kristian Waagan added a comment -

        I will commit the patch under this issue tomorrow if nobody objects.

        Show
        Kristian Waagan added a comment - I will commit the patch under this issue tomorrow if nobody objects.
        Hide
        Kristian Waagan added a comment -

        'derby-1318-1a-for_comments.diff' is a first attempt at writing a test for verifying compatibility for the current data source implementations towards to old ones. It will do basic testing only by de-serializing an old data source and recreating it by using javax.naming.Reference.

        It is based on checked in versions of old data sources. This might not be required if the upgrade test is run by default, but I think it might be a valuable addition anyway to catch incompatibilities quickly and it doesn't require you to have access to old releases.

        I have also included a utility that can be run to write data sources to file. All you have to do is run it with a given version of Derby on the classpath, and it will write all data sources it knows about (predefined list) to file if it can find them. The utility currently lives in 'functionTests/testData/serialized-data-sources', I'm not convinced if that's the best place and I'm open for other suggestions

        I would appreciate comments on the approach and the test in general.
        I also feel the test I've written is a bit on the side of the Jira issue, so I can create a separate issue if required.

        Show
        Kristian Waagan added a comment - 'derby-1318-1a-for_comments.diff' is a first attempt at writing a test for verifying compatibility for the current data source implementations towards to old ones. It will do basic testing only by de-serializing an old data source and recreating it by using javax.naming.Reference. It is based on checked in versions of old data sources. This might not be required if the upgrade test is run by default, but I think it might be a valuable addition anyway to catch incompatibilities quickly and it doesn't require you to have access to old releases. I have also included a utility that can be run to write data sources to file. All you have to do is run it with a given version of Derby on the classpath, and it will write all data sources it knows about (predefined list) to file if it can find them. The utility currently lives in 'functionTests/testData/serialized-data-sources', I'm not convinced if that's the best place and I'm open for other suggestions I would appreciate comments on the approach and the test in general. I also feel the test I've written is a bit on the side of the Jira issue, so I can create a separate issue if required.
        Hide
        Andrew McIntyre added a comment -

        Unsetting Fix Version on unassigned issues.

        Show
        Andrew McIntyre added a comment - Unsetting Fix Version on unassigned issues.
        Hide
        Rick Hillegas added a comment -

        Move to 10.3.0.0.

        Show
        Rick Hillegas added a comment - Move to 10.3.0.0.
        Hide
        Rick Hillegas added a comment -

        Moving to 10.2.2.0.

        Show
        Rick Hillegas added a comment - Moving to 10.2.2.0.

          People

          • Assignee:
            Unassigned
            Reporter:
            Rick Hillegas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development