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...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.2.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ovirt-4.2.7
: ---
Assignee: Ori Liel
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks:
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-4.2.7.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-02 14:31:38 UTC
oVirt Team: Infra
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
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:

org.ovirt.engine.api.restapi.types.AbstractInvertibleMappingTest.testRoundtrip()
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):
ovirt-engine-4.3-master

How reproducible:
100%

Steps to Reproduce:
1. create new entry in org.ovirt.engine.api.model.BootProtocol
2. create corresponding entry in org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol but NOT in org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol
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:

http://jenkins.ovirt.org/job/ovirt-engine_master_check-patch-fc28-x86_64/2136/ 
http://jenkins.ovirt.org/job/ovirt-engine_master_check-patch-el7-x86_64/42666/

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
CodeChange

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.