Relax duration bounds in backpressure prose test

XMLWordPrintableJSON

    • Type: Spec Change
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Component/s: Backpressure
    • None
    • Needed - No Spec Changes
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-6465 Blocked
      CXX-3581 Blocked
      CSHARP-6229 Blocked
      GODRIVER-4141 Blocked
      JAVA-6311 Blocked
      NODE-7834 Duplicate
      PYTHON-6092 Blocked
      PHPLIB-1951 Blocked
      RUBY-3957 Blocked
      RUST-2501 Blocked
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } #scriptField td.willNotDo { background-color: #FF0000; /* Red color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-6465 Blocked CXX-3581 Blocked CSHARP-6229 Blocked GODRIVER-4141 Blocked JAVA-6311 Blocked NODE-7834 Duplicate PYTHON-6092 Blocked PHPLIB-1951 Blocked RUBY-3957 Blocked RUST-2501 Blocked

      Step 10 of prose test 5 ("Overload Errors with baseBackoffMS override base backoff") asserts exact lower bounds on measured durations:

      assertGreaterEqual(exponential_backoff_time, 0.6)
      assertGreaterEqual(with_base_backoff_ms_time, 0.3)
      assertLess(with_base_backoff_ms_time, 0.6)
      

      With jitter pinned to 1, the lower bounds equal the exact sum of the backoff sleeps (0.2 + 0.4 = 0.6s, 0.1 + 0.2 = 0.3s), leaving zero tolerance. On some platforms sleep timers run on a millisecond-granularity clock, so a sleep of N ms can complete marginally (sub-millisecond) early when the duration is measured with a higher-resolution clock (e.g. performance.now() in Node.js). With zero tolerance, this fails the assertion.

      Proposal: subtract a small tolerance (e.g. 5ms) from the two lower bounds in step 10.

            Assignee:
            Sergey Zelenov
            Reporter:
            Sergey Zelenov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: