[NETVIRT-761] aclservice component tests broken Created: 04/Jul/17 Updated: 19/Oct/17 Resolved: 11/Jul/17 |
|
| Status: | Resolved |
| Project: | netvirt |
| Component/s: | General |
| Affects Version/s: | Nitrogen |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Michael Vorburger | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 8800 |
| Description |
|
While starting to investigate the sporadic test failures we see in the aclservice component tests (AclServiceTestBase: AclServiceStatefulTest, AclServiceStatelessTest, AclServiceTestBaseIPv6, AclServiceStatefulIPv6Test), I realized that before & in parallel to solving that, we should probably tackle a bigger problem in those tests... they don't actually work and don't really test much, anymore! The following messages appear in the log of e.g. AclServiceStatefulTest's newInterfaceWithMultipleAcl() : [main] WARN org.opendaylight.genius.mdsalutil.interfaces.testutils.TestIMdsalApiManager - assert containsExactlyElementsIn() failed which points out a mismatch between expected and actual flows - but the test does not fail, when this occurs! This is an impact of the FlowEntity-immutable changes https://git.opendaylight.org/gerrit/#/c/53763/ and https://git.opendaylight.org/gerrit/#/c/54390/ from a few 2-3 months - which we, apparently, completely missed (I'll create a new non-regression test to avoid this in the future). What happened is that the new FlowEntityBuilder, generated by https://immutables.github.io through the @Immutable BUT https://github.com/vorburger/xtendbeans, due to a "bug" (this was never needed before) did not support this (it returned almost empty object initialization literals; because it did not "see" the properties, when there is no getter on a Builder). And due to an oversight / bug in TestIMdsalApiManager's assertFlowsInAnyOrder(), this caused only the logs above, but not the tests to fail! The solution includes a number of steps, including: 1. fixing xtendbeans to support Builders which have no getters, only setters; upgrade ODL (mdsal) to use new release 2. fixing TestIMdsalApiManager's assertFlowsInAnyOrder() to actually fail when flows mismatch 3. fixing aclservice code (or just updating FlowEntryObjectsStateful.xtend) to fix failures that have crept in (not noticed) |
| Comments |
| Comment by Michael Vorburger [ 04/Jul/17 ] |
|
> fixing aclservice code (or just updating FlowEntryObjectsStateful.xtend) to fix failures that have crept in TBD next, and BEFORE merging the following changes (because they will cause aclservice test failures otherwise) One can locally see the test failures by adding this to the aclservice-impl/pom.xml: <dependency> > fixing xtendbeans to support Builders which have no getters, only setters https://github.com/vorburger/xtendbeans/commit/377364c67b80f1253fb25a82ae596fc9dc585a1d > upgrade ODL (mdsal) to use new release https://git.opendaylight.org/gerrit/#/c/59950/ > fixing TestIMdsalApiManager's assertFlowsInAnyOrder() to actually fail when flows mismatch |
| Comment by Sam Hague [ 05/Jul/17 ] |