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

tst_qsqlquery should not create unique data tags when testing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important 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)

      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.

        For Gerrit Dashboard: QTBUG-100245
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes