Derby
  1. Derby
  2. DERBY-5318

Use assertDirectoryDeleted in ReplicationRun and remove dead code

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: 10.8.2.2, 10.9.1.0
    • Component/s: Test
    • Labels:
      None

      Description

      The error reporting in the replication test when deleting files to initialize the master/slave is insufficient. A message is printed to the console, but the test continues to run. This can cause the test to fail for what appears to be a different reason the left-over files.

        Issue Links

          Activity

          Hide
          Kristian Waagan added a comment -

          Attaching patch 1a, which makes use of BaseJDBCTestCase.assertDirectoryDeleted to make the test fail if some of the files in the database directory can't be deleted. Note that the root directory will now be deleted and recreated, whereas before the patch the files inside the root directory were deleted.
          Also removed dead code and pruned out some unused method arguments.

          The replication test ran fine on Solaris 11, will test on Windows too.
          Patch ready for review.

          Show
          Kristian Waagan added a comment - Attaching patch 1a, which makes use of BaseJDBCTestCase.assertDirectoryDeleted to make the test fail if some of the files in the database directory can't be deleted. Note that the root directory will now be deleted and recreated, whereas before the patch the files inside the root directory were deleted. Also removed dead code and pruned out some unused method arguments. The replication test ran fine on Solaris 11, will test on Windows too. Patch ready for review.
          Hide
          Kristian Waagan added a comment -

          Verified on Windows Vista.
          All subsequent tests will fail with the same error if one or more files cannot be deleted.
          If the file(s) can be deleted again for some reason, the test will "recover". If this happens, something kept a file open for some time, but then closed the file handle.

          Show
          Kristian Waagan added a comment - Verified on Windows Vista. All subsequent tests will fail with the same error if one or more files cannot be deleted. If the file(s) can be deleted again for some reason, the test will "recover". If this happens, something kept a file open for some time, but then closed the file handle.
          Hide
          Kristian Waagan added a comment -

          Committed to trunk with revision 1146644.

          Show
          Kristian Waagan added a comment - Committed to trunk with revision 1146644.
          Hide
          Kristian Waagan added a comment -

          Backported to 10.8 with revision 1156997.

          Show
          Kristian Waagan added a comment - Backported to 10.8 with revision 1156997.
          Hide
          Kristian Waagan added a comment -

          Closing issue.

          Show
          Kristian Waagan added a comment - Closing issue.

            People

            • Assignee:
              Kristian Waagan
              Reporter:
              Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development