Bug #9027
closedFix Bridge unit tests
100%
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.
Updated by Evgeny Novikov over 6 years ago
- Related to Feature #8729: Bridge does not work with Django 2.* added
Updated by Evgeny Novikov over 6 years ago
- Blocked by Feature #9013: Get rid of redundant caches added
Updated by Evgeny Novikov over 6 years ago
- 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.
Updated by Evgeny Novikov over 6 years ago
- Target version changed from 1.1 to 2.0
Let's Vladimir will do this after his vacation.
Updated by Vladimir Gratinskiy about 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Tests were updated in branch "bridge-2.0".
Updated by Evgeny Novikov about 6 years ago
- Status changed from Resolved to Closed
Tests passed, so, I merged the branch to master in b8bda00ac.
Updated by Evgeny Novikov about 6 years ago
- 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?
Updated by Vladimir Gratinskiy about 6 years ago
- 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".
Updated by Evgeny Novikov about 6 years ago
- 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.