Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-2143

Fix tests for pt-deadlock-logger

Details

    • Improvement
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 3.5.0
    • 3.5.1
    • None
    • None
    • Yes
    • Yes
    • 2

    Description

      How to Repeat

      Results are for PS 5.7.40.

      $ prove -vw --trap --timer t/pt-deadlock-logger/
      ...
      [17:34:33] t/pt-deadlock-logger/standard_options.t ..... 
      ok 1 - Source DSN inherits from standard connection options (issue 248)
      not ok 2 - Dies if PID file already exists (--pid without --daemonize) (issue 391)
      
      #   Failed test 'Dies if PID file already exists (--pid without --daemonize) (issue 391)'
      #   at t/pt-deadlock-logger/standard_options.t line 68.
      #                   'Can't locate object method "make_PID_file" via package "Daemon" at /home/sveta/src/percona-toolkit/bin/pt-deadlock-logger line 4761.
      # '
      #     doesn't match '(?^:PID file /tmp/pt-deadlock-logger-test.pid.102629 already exists)'
      not ok 3 - It lives daemonized
      
      #   Failed test 'It lives daemonized'
      #   at t/pt-deadlock-logger/standard_options.t line 88.
      #                   ''
      #     doesn't match '(?^:pt\-deadlock\-logger\ h\=127\.1\,P\=12345\,u\=msandbox\,p\=msandbox)'
      # 
      not ok 4 - PID file created
      
      #   Failed test 'PID file created'
      #   at t/pt-deadlock-logger/standard_options.t line 96.
      # 
      Cannot open /tmp/pt-deadlock-logger-test.pid.102629: No such file or directory at t/pt-deadlock-logger/standard_options.t line 101.
      # Tests were run but no plan was declared and done_testing() was not seen.
      # Looks like your test exited with 2 just after 4.
      Dubious, test returned 2 (wstat 512, 0x200)
      Failed 3/4 subtests 
      

      Suggested Fix

      Identify which tests fail, because badly written and which show real issues with code, fix either tests or code.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sveta.smirnova Sveta Smirnova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist