Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1603150 - Potential bugs not caught because of randomized unit tests on mapping conversion between api model entities and engine business entities
Summary: Potential bugs not caught because of randomized unit tests on mapping convers...
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.2.2
Hardware: Unspecified
OS: Unspecified
unspecified vote
Target Milestone: ovirt-4.2.7
: ---
Assignee: Ori Liel
QA Contact: Lukas Svaty
Depends On:
TreeView+ depends on / blocked
Reported: 2018-07-19 10:15 UTC by eraviv
Modified: 2018-11-02 14:31 UTC (History)
2 users (show)

Fixed In Version: ovirt-engine-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-11-02 14:31:38 UTC
oVirt Team: Infra
rule-engine: ovirt-4.2+

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
oVirt gerrit 94312 master MERGED restapi: Eliminate Randomization in Mapper Tests 2018-09-25 08:14:02 UTC
oVirt gerrit 94514 ovirt-engine-4.2 MERGED restapi: Eliminate Randomization in Mapper Tests 2018-09-26 07:14:35 UTC

Description eraviv 2018-07-19 10:15:42 UTC
Description of problem:

uses randomization to test conversion of api model entities to engine business entities. This may cause a hole in the modelling to be overlooked and if a specific value is not triggered by the test.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. create new entry in org.ovirt.engine.api.model.BootProtocol
2. create corresponding entry in but NOT in
3. compile and run the round trip test

Actual results:
the test fails sometimes and in different places

Expected results:
test should be deterministic - either always fail or always succeed

Additional info:

Comment 1 Ori Liel 2018-09-13 09:00:10 UTC
This bug is about a necessary code change in unit-test classes. The verification is that the unit-tests pass after the code change. I have verified this and it can also be seen in jenkins:

Therefore I am changing the status of the bug to 'VERIFIED'

Comment 2 Ori Liel 2018-09-13 09:01:42 UTC
(changed back to post because patch was not submitted yet, pending review)

Comment 3 Ori Liel 2018-09-13 09:01:52 UTC
(changed back to post because patch was not submitted yet, pending review)

Comment 4 Ori Liel 2018-09-13 12:29:22 UTC
Note: by picking a single enum value for each value, some coverage is lost, since across time all enum values are tested. The tested code is trivial, making the loss quite insignificant. Tests for mapping of specific enums, covering all values, may be added by developers where felt necessary. This message will be added to the commit message of the patch as well

Comment 5 Lukas Svaty 2018-10-10 07:26:08 UTC

Comment 6 Sandro Bonazzola 2018-11-02 14:31:38 UTC
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Note You need to log in before you can comment on or make changes to this bug.