Qpid
  1. Qpid
  2. QPID-3775

Automate the manual persistent store tests

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.15
    • Component/s: Java Tests
    • Labels:
      None

      Description

      The Java broker currently has a suite of manual persistent store tests. These tests should be automated as part of the System Test suite.

      BDB-Qpid-1 Verifies that committed messages survive clean broker shutdown, after fully completing a number of transactions.
      BDB-Qpid-2 Verifies that committed messages survive immediate (kill -9) broker shutdown, after fully completing a number of transactions.
      BDB-Qpid-5 Verifies that committed messages survive clean broker shutdown, when broker is shutdown mid-transaction.
      BDB-Qpid-6 Verifies that committed messages survive immediate (kill -9) broker shutdown, when broker is shutdown mid-transaction.
      BDB-Qpid-7 Verifies that committed messages survive client connection termination, when clients connection is closed mid-transaction.
      BDB-Qpid-8 Verifies that committed messages survive message store backup and restore, when broker is restarted on a restored backup.

      The non-store implementation specific tests should be incorporated into the PersistentStoreTest system test. The test BDB-Qpid-8 is BDB specific and a should be implemented as in BDB specific system test.

      QBTC will need to be extended to permit the shutting down the Broker down ungracefully (using kill -9). Currently the framework uses java.lang.Process#destroy() which is implemented as kill -15.

        Activity

        Hide
        Keith Wall added a comment -

        Finally testing in progress, uploaded for safe keeping.

        Show
        Keith Wall added a comment - Finally testing in progress, uploaded for safe keeping.
        Hide
        Alex Rudyy added a comment -

        Hi Keith,

        I and Andrew reviewed your patch and found some tiny issues which we fixed in a new patch attached (0001-QPID-3775-Automate-the-manual-persistent-store-tests-updated.patch):

        1) changed BDBBackupTest to be able to run it on Windows
        2) fixed SpawnedBrokerHolder#kill() to use kill -KILL <pid> to kill the broker process, fixed SpawnedBrokerHolder#shutdown() to utilize process.destroy() to destroy broker gracefully
        3) reverted back some changes in FailoverBaseCase in order not to stop broker abruptly as failover tests require some additional changes (IMHO, we need to change FailoverBaseCase to utilize BrokerHolder#kill() in a separate review )

        Show
        Alex Rudyy added a comment - Hi Keith, I and Andrew reviewed your patch and found some tiny issues which we fixed in a new patch attached (0001- QPID-3775 -Automate-the-manual-persistent-store-tests-updated.patch): 1) changed BDBBackupTest to be able to run it on Windows 2) fixed SpawnedBrokerHolder#kill() to use kill -KILL <pid> to kill the broker process, fixed SpawnedBrokerHolder#shutdown() to utilize process.destroy() to destroy broker gracefully 3) reverted back some changes in FailoverBaseCase in order not to stop broker abruptly as failover tests require some additional changes (IMHO, we need to change FailoverBaseCase to utilize BrokerHolder#kill() in a separate review )
        Hide
        Alex Rudyy added a comment -

        Hi Keith,

        Could you please have a look and commit an updated patch?

        Show
        Alex Rudyy added a comment - Hi Keith, Could you please have a look and commit an updated patch?
        Hide
        Keith Wall added a comment -

        Patch applied.

        Show
        Keith Wall added a comment - Patch applied.
        Hide
        Keith Wall added a comment -

        Tests failed on Jenkins as the Qpid-Matrix paths contain spaces. This was caused by a preexisting defect in the path/argument handling of backup.sh (and storeUpgrade.sh).

        Show
        Keith Wall added a comment - Tests failed on Jenkins as the Qpid-Matrix paths contain spaces. This was caused by a preexisting defect in the path/argument handling of backup.sh (and storeUpgrade.sh).
        Hide
        Keith Wall added a comment -

        Committed patch to correct the argument/QPID_HOME handling. Also changed the scripts so that BDB library version is no longer explicit and the scripts behave in the same manner as qpid-server etc.

        Show
        Keith Wall added a comment - Committed patch to correct the argument/QPID_HOME handling. Also changed the scripts so that BDB library version is no longer explicit and the scripts behave in the same manner as qpid-server etc.
        Hide
        Keith Wall added a comment -

        Alex, can you review the script changes please?

        Show
        Keith Wall added a comment - Alex, can you review the script changes please?
        Hide
        Alex Rudyy added a comment -

        The changes in BDB scripts seem reasonable for me.

        I have only one comment about backup.sh changes:

        We do not need to add bdb jars into classpath because backup.sh does not use bdb API to copy data. Instead files are copied using standard java io API.

        Show
        Alex Rudyy added a comment - The changes in BDB scripts seem reasonable for me. I have only one comment about backup.sh changes: We do not need to add bdb jars into classpath because backup.sh does not use bdb API to copy data. Instead files are copied using standard java io API.
        Hide
        Keith Wall added a comment -

        I've changed the two BDB scripts to avoid use of readlink. Robbie, could you review please?

        Show
        Keith Wall added a comment - I've changed the two BDB scripts to avoid use of readlink. Robbie, could you review please?
        Hide
        Robbie Gemmell added a comment -

        Looks good to me.

        Show
        Robbie Gemmell added a comment - Looks good to me.

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Keith Wall
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development