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

Be able to specify the number of chars to capture from data streams in Python tests

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • WT11.2.0, 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • 2
    • StorEng - 2023-08-08

      While testing WT-11332, I ended up having a truncated output from the Python tests because of the following hardcoded value:

          def checkAdditionalPattern(self, testcase, pat, re_flags = 0):
      ...
              gotstr = self.readFileFrom(self.filename, self.expectpos, 1500)
      

      We should be more flexible on the number of characters we want to read. For instance, the functions readStdout and readStderr have this flexibility:

          def readStdout(self, maxchars=10000):
              return self.captureout.readFileFrom(self.captureout.filename, self.captureout.expectpos, maxchars)
      
          def readStderr(self, maxchars=10000):
              return self.captureerr.readFileFrom(self.captureerr.filename, self.captureerr.expectpos, maxchars)
      

            Assignee:
            etienne.petrel@mongodb.com Etienne Petrel
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: