Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-7876

Update rollback to stable test to use correct boolean values and update statistic checking logic

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.1, 5.1.0, 4.4.9, 5.0.3
    • Component/s: None
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      Storage - Ra 2021-08-09

      Description

      In test_rollback_to_stable19, someone accidentally wrote true and false (Python strings) in the scenario specifications when they meant True and False (Python booleans). Unfortunately, since Python is weakly typed, all nonempty strings are silently equivalent to True. This means that the scenarios associated with the false case (for 'shutdown' rather than 'crash') were never actually run (instead they duplicate the true) case. When this mistake is corrected, the uncovered 'shutdown' tests fail. Here's the diff to fix the mistake:

      --- a/test/suite/test_rollback_to_stable19.py
      +++ b/test/suite/test_rollback_to_stable19.py
      @@ -52,8 +52,8 @@ class test_rollback_to_stable19(test_rollback_to_stable_base):
       ]
       
       restart_options = [
      - ('shutdown', dict(crash='false')),
      - ('crash', dict(crash='true')),
      + ('shutdown', dict(crash=False)),
      + ('crash', dict(crash=True)),
       ]
       
       scenarios = make_scenarios(in_memory_values, key_format_values, restart_options)
      

      Then e.g. both subtests of scenario 2 fail with

      FAIL: test_rollback_to_stable19.test_rollback_to_stable19.test_rollback_to_stable_no_history -s 2 (no_inmem.integer_row.shutdown)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/y/extrahome/dhwt/shub/work/test/suite/test_rollback_to_stable19.py", line 136, in test_rollback_to_stable_no_history
       
          self.assertGreater(upd_aborted, 0)
      AssertionError: 0 not greater than 0
      

        Attachments

          Activity

            People

            Assignee:
            siddhartha.mahajan Sid Mahajan
            Reporter:
            dholland+wt@sauclovia.org David Holland
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: