[VTN-18] VTNManagerImplWithNodesTest is unstable. Created: 13/May/14  Updated: 03/May/18  Resolved: 25/Jun/14

Status: Resolved
Project: vtn
Component/s: VTN Manager
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Shigeru Yasuda Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


External issue ID: 996

 Description   

Somtimes unit test for manager.implementation fails.

java.lang.AssertionError: expected:<3> but was:<4>
at org.junit.Assert.fail(Assert.java:91)
at org.junit.Assert.failNotEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:126)
at org.junit.Assert.assertEquals(Assert.java:470)
at org.junit.Assert.assertEquals(Assert.java:454)
at org.opendaylight.vtn.manager.internal.TestUseVTNManagerBase$VTNManagerAwareStub.checkVIfInfo(TestUseVTNManagerBase.java:570)
at org.opendaylight.vtn.manager.internal.VTNManagerImplWithNodesTest.testRecalculateDone(VTNManagerImplWithNodesTest.java:2125)

This is caused by too short event timeout.



 Comments   
Comment by Shigeru Yasuda [ 13/May/14 ]

A patch was pushed.

https://git.opendaylight.org/gerrit/6927

Comment by Shigeru Yasuda [ 14/May/14 ]

This patch was merged to stable/hydrogen branch.

https://git.opendaylight.org/gerrit/6982

Comment by Shigeru Yasuda [ 25/Jun/14 ]

Reopen because this failure still happen.

https://jenkins.opendaylight.org/vtn/job/vtn-controller-integration/1320/

I investigated the test code, and found the true cause of this failure.

This test adds IVTNManagerAware service dynamically, and verifies that
IVTNManagerAware receives expected number of VTN events.
But it may receives VTN events generated by previous test because of
incorrect event synchronization in the test code.

This test code needs to ensure that no VTN event is pending before adding
IVTNManagerAware listener.

Comment by Shigeru Yasuda [ 25/Jun/14 ]

Fixed.

https://git.opendaylight.org/gerrit/8324 (master)
https://git.opendaylight.org/gerrit/8327 (stable/hydrogen)

Generated at Wed Feb 07 20:47:46 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.