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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 4.4.9, 5.0.3, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 3
    • Storage - Ra 2021-08-09

      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
      

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

              Created:
              Updated:
              Resolved: