bihealth / sodar-server

SODAR: System for Omics Data Access and Retrieval
https://github.com/bihealth/sodar-server
MIT License
14 stars 3 forks source link

Sporadic CI test failure in TestIrodsAccessTicketCreateView #2026

Closed mikkonie closed 1 month ago

mikkonie commented 1 month ago

A recent CI run failed with an odd bug. A subsequent commit with changes only in the manual passed CI without issues, so this would seem like some kind of sporadic fluke. Still, should be looked into. Never seen this exact one before and nothing in these tests should have changed recently..

======================================================================
FAIL: test_post_contributor (samplesheets.tests.test_views_taskflow.TestIrodsAccessTicketCreateView)
Test POST as contributor
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/sodar-server/sodar-server/samplesheets/tests/test_views_taskflow.py", line 781, in test_post_contributor
    self.assertListEqual(
AssertionError: Lists differ: [<User: user_owner_cat>, <User: superuser>] != [<User: superuser>, <User: user_owner_cat>]

First differing element 0:
<User: user_owner_cat>
<User: superuser>

- [<User: user_owner_cat>, <User: superuser>]
+ [<User: superuser>, <User: user_owner_cat>]

----------------------------------------------------------------------
Ran 1562 tests in 2090.513s

FAILED (failures=1)
mikkonie commented 1 month ago

Fixed. The order of the queryset was not enforced which can sometimes lead to something like this. I also cleaned up the test a bit.