Bug #9027
closed
Added by Evgeny Novikov over 6 years ago.
Updated about 6 years ago.
Description
Bridge unit tests are precious, but recent huge changes break them partially. Moreover, removing caches will influence tests as well. After it we need to fix tests ASAP.
- Related to Feature #8729: Bridge does not work with Django 2.* added
- Target version changed from 2.0 to 1.1
This issue is not strictly bound with purposes of 2.0 that targets verification of C software.
- Target version changed from 1.1 to 2.0
Let's Vladimir will do this after his vacation.
- Status changed from New to Resolved
- % Done changed from 0 to 100
Tests were updated in branch "bridge-2.0".
- Status changed from Resolved to Closed
Tests passed, so, I merged the branch to master in b8bda00ac.
- Status changed from Closed to Open
When I ran Bridge unit tests several times "manually", they always passed. But all invocations of these tests by CI reveal the following only issue:
..............E...............
======================================================================
ERROR: test_reports (reports.test.TestReports)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/www/klever-bridge/reports/test.py", line 260, in test_reports
self.__decide_job(SJC_1)
File "/var/www/klever-bridge/reports/test.py", line 793, in __decide_job
core_coverage.update(self.__upload_subjob(subjob))
File "/var/www/klever-bridge/reports/test.py", line 827, in __upload_subjob
self.__upload_finish_report(lkbce)
File "/var/www/klever-bridge/reports/test.py", line 578, in __upload_finish_report
self.assertIsNotNone(ReportComponent.objects.get(identifier=self.job.identifier + r_id).finish_date)
File "/usr/local/lib/python3.5/dist-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 403, in get
self.model._meta.object_name
reports.models.DoesNotExist: ReportComponent matching query does not exist.
----------------------------------------------------------------------
Can this be fixed or workarounded somehow?
- Status changed from Open to Resolved
Evgeny Novikov wrote:
When I ran Bridge unit tests several times "manually", they always passed. But all invocations of these tests by CI reveal the following only issue:
[...]
Can this be fixed or workarounded somehow?
The reason is I used "fast run decision" for all jobs in tests. For development mode (used in your manual tests) the job is "full-weight", for production (in CI) it is lightweight, where reports without children are deleted on "finish report" upload. Fixed in "klever-2.0".
- Status changed from Resolved to Closed
It works now. It did depend on settings.py that was development for local invocations of tests and production for CI. I cherry picked the commit from klever-2.0 to master.
Also available in: Atom
PDF