Project

General

Profile

Actions

Bug #9027

closed

Fix Bridge unit tests

Added by Evgeny Novikov over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Urgent
Category:
Bridge
Target version:
Start date:
06/28/2018
Due date:
% Done:

100%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

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 issues 2 (0 open2 closed)

Related to Klever - Feature #8729: Bridge does not work with Django 2.*ClosedVladimir Gratinskiy02/19/2018

Actions
Blocked by Klever - Feature #9013: Get rid of redundant cachesClosedVladimir Gratinskiy06/27/2018

Actions
Actions #1

Updated by Evgeny Novikov over 6 years ago

  • Related to Feature #8729: Bridge does not work with Django 2.* added
Actions #2

Updated by Evgeny Novikov over 6 years ago

Actions #4

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.

Actions #5

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.

Actions #6

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".

Actions #7

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.

Actions #8

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?

Actions #9

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".

Actions #10

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.

Actions

Also available in: Atom PDF