Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-100245

tst_qsqlquery should not create unique data tags when testing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.2.7, 6.4.1, 6.5.0 Beta1
    • 7.0 (Next Major Release)
    • SQL Support
    • None
    • 30077d462d (qt/qtbase/dev) 30077d462d (qt/tqtc-qtbase/dev) 8bd7f1334c (qt/tqtc-qtbase/6.2) c22bf97cb1 (qt/qtbase/6.4) c22bf97cb1 (qt/tqtc-qtbase/6.4) c22bf97cb1 (qt/tqtc-qtbase/6.4.1) c22bf97cb1 (qt/tqtc-qtbase/tqtc/qtinsight-6.4)

    Description

      The problem happened when I got a specific testfunction:datatag to fail:

      FAIL!  : tst_QSqlQuery::queryOnInvalidDatabase(0_QSQLITE@/tmp/tst_qsqlquery-uElocV/foo.db) 'query.lastError().isValid()' returned FALSE. (query.lastError().isValid() should be true!)
      

      Then, I tried to re-run the specific testfunction:datatag to reproduce the failure:

      tst_qsqlquery queryOnInvalidDatabase:0_QSQLITE@/tmp/tst_qsqlquery-uElocV/foo.db

      But that data tag no longer exists since the directory is unique and temporary. Instead the test program suggest to me the following, which is also apparently bogus:

      Unknown testdata for function queryOnInvalidDatabase: '0_QSQLITE@/tmp/tst_qsqlquery-uElocV/foo.db()'
      Available testdata:
      0_QSQLITE@/tmp/tst_qsqlquery-WxHaaA/foo.db

      Solution: the data tags shouldn't contain the "-XXXXXX" random string in their name.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              manordheim MÃ¥rten Nordheim
              jimis Dimitrios Apostolou
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes