# Tests failing on Slicer factory that do not fail locally

**URL:** <https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109>\
**Category:** Development\
**Tags:** dashboard\
**Created:** [June 10, 2019, 1:48pm UTC](https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109 "2019-06-10T13:48:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [June 10, 2019, 1:48pm UTC](https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109/1 "2019-06-10T13:48:51Z")

</div>

I noticed a while ago that about a dozen tests keep failing on the Slicer dashboard both for Windows and Mac. I ran the tests that I think I’d be responsible for fixing (py\_SubjectHierarchyGenericSelfTest, qSlicerModelsModuleWidgetTest\*), and all of these pass on my computer. The dashboard does not show any output for these tests for neither platform.

All of these tests actually start Slicer and show the GUI. Can the reason for the failing tests be that the GUI cannot be oponed on the factory? Or any other ideas? Thanks! @jcfr @Sam_Horvath

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [June 11, 2019, 2:33am UTC](https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109/2 "2019-06-11T02:33:01Z")

</div>

For py\_SubjectHierarchyGenericSelfTest I see some test output on the cdash dashboard such as:

```auto
Test directory: /var/folders/6y/zp9dkw5d5wg35y8qvn29hpww0000gn/T/Slicer-tmp-kitware/SubjectHierarchyGenericSelfTest
Clear scene
Switching to temporary DICOM database: /var/folders/6y/zp9dkw5d5wg35y8qvn29hpww0000gn/T/Slicer-tmp-kitware/SubjectHierarchyGenericSelfTest/CtkDicomDatabase
QSqlDatabasePrivate::removeDatabase: connection 'SLICER' is still in use, all queries will cease to work.
QSqlDatabasePrivate::addDatabase: duplicate connection name 'SLICER', old connection removed.

```

Do you not see this output for Mac tests?  
I’m also not sure why the Windows test output is usually less descriptive on cdash dashboard. That’s why I always look at the Mac output.

The test also appears to have been failing since [April 16th](http://slicer.cdash.org/testDetails.php?test=9571122&build=1564613). You seemed to have a [discussion](https://github.com/Slicer/Slicer/commit/75fceb26fb40397eac1b06fb2030c7b040f861ad) with JC about a DICOM browser commit but I can’t tell if anything was acted upon.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [June 11, 2019, 3:05am UTC](https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109/3 "2019-06-11T03:05:57Z")

</div>

> [@jamesobutler](#):
>
> That’s why I always look at the Mac output.

Same here. Not sure why I didn’t see this.  
The log does not show much though, these messages are normal. It still seems to me that the GUI is not constructed.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 11, 2019, 3:13am UTC](https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109/4 "2019-06-11T03:13:32Z")

</div>

I suspect it if related to remaining files in temporary directory. I will confirm this tomorrow.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 11, 2019, 1:58pm UTC](https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109/5 "2019-06-11T13:58:01Z")

</div>

> [@jamesobutler](#):
>
> connection ‘SLICER’ is still in use, all queries will cease to work

Just to clarify, this is not normal, it is an error, most probably because multiple database connections are created with the same name. The easiest solution is to not provide a connection name to ctkDICOMDatabase.openDatabase (and then a random connection name is generated).

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [June 11, 2019, 2:28pm UTC](https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109/6 "2019-06-11T14:28:32Z")

</div>

I remember getting this error message regularly in passing tests (an [example](http://slicer.cdash.org/testDetails.php?test=9652239&build=1612644)). So in this sense it is normal.

The tests do not fail because of this, especially that most of these failing tests do not even use DICOM.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [June 11, 2019, 6:34pm UTC](https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109/7 "2019-06-11T18:34:43Z")

</div>

The test timeout because of the message asking to update the database, as discussed [here](https://github.com/Slicer/Slicer/commit/75fceb26fb40397eac1b06fb2030c7b040f861ad#r33215120) I suggest test automatically choose one or the other option.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/1/513d33483aec9c02c191fb3f9dc31d40a4260d9c.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [June 11, 2019, 6:48pm UTC](https://discourse.slicer.org/t/tests-failing-on-slicer-factory-that-do-not-fail-locally/7109/8 "2019-06-11T18:48:46Z")

</div>

Right, thanks for the reminder. I’ll fix this asap.

Some other tests that fail on the dashboard and pass on my computer (like the Models tests) don’t use DICOM, so they must fail for a different reason.
