[OVSDB-151] org.opendaylight.ovsdb.southbound.it.SouthboundIT.testGetOvsdbNodes(SouthboundIT.java:988) -- java.lang.AssertionError: There should only be one node in the topology expected:<1> but was:<2> Created: 06/May/15  Updated: 19/Oct/17  Resolved: 06/May/15

Status: Resolved
Project: ovsdb
Component/s: Southbound.Open_vSwitch
Affects Version/s: unspecified
Fix Version/s: None

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

Operating System: All
Platform: All


External issue ID: 3140

 Description   

java.lang.AssertionError: There should only be one node in the topology expected:<1> but was:<2>

2015-05-06 09:52:21,420 | INFO | 3)-192.168.2.248 | SouthboundIT | 276 - PAXEXAM-PROBE-2e588530-06f3-4c5e-a7d1-a7f357f2e0a8 - 0.0.0 | Connected to 192.168.50.4:6640
2015-05-06 09:52:21,422 | INFO | 3)-192.168.2.248 | AbstractConfigTestBase | 276 - PAXEXAM-PROBE-2e588530-06f3-4c5e-a7d1-a7f357f2e0a8 - 0.0.0 | TestWatcher: Test failed:
testGetOvsdbNodes(org.opendaylight.ovsdb.southbound.it.SouthboundIT)
java.lang.AssertionError: There should only be one node in the topology expected:<1> but was:<2>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.opendaylight.ovsdb.southbound.it.SouthboundIT.testGetOvsdbNodes(SouthboundIT.java:988)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_67]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)[64:org.ops4j.pax.tipi.junit:4.12.0.1]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:68)
at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:37)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)[64:org.ops4j.pax.tipi.junit:4.12.0.1]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)[64:org.ops4j.pax.tipi.junit:4.12.0.1]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)[64:org.ops4j.pax.tipi.junit:4.12.0.1]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)[64:org.ops4j.pax.tipi.junit:4.12.0.1]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)[64:org.ops4j.pax.tipi.junit:4.12.0.1]
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)[64:org.ops4j.pax.tipi.junit:4.12.0.1]
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:124)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.findAndInvoke(JUnitProbeInvoker.java:97)
at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.call(JUnitProbeInvoker.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_67]
at org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl.remoteCall(RemoteBundleContextImpl.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_67]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_67]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_67]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_67]
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)[:1.7.0_67]
at sun.rmi.transport.Transport$1.run(Transport.java:177)[:1.7.0_67]
at sun.rmi.transport.Transport$1.run(Transport.java:174)[:1.7.0_67]
at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_67]
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)[:1.7.0_67]
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)[:1.7.0_67]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)[:1.7.0_67]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)[:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_67]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_67]
2015-05-06 09:52:21,426 | INFO | 3)-192.168.2.248 | AbstractConfigTestBase | 276 - PAXEXAM-PROBE-2e588530-06f3-4c5e-a7d1-a7f357f2e0a8 - 0.0.0 | TestWatcher: Finished test:
testGetOvsdbNodes(org.opendaylight.ovsdb.southbound.it.SouthboundIT)
2015-05-06 09:52:21,694 | WARN | Bundle Shutdown | core | 270 - org.apache.aries.jmx.core - 1.1.2 | Task rejected for JMX Notification dispatch of event [org.osgi.framework.ServiceEvent[source=

{javax.management.MBeanServer}

=

{osgi.service.blueprint.compname=mbeanServer, service.id=645}

]] - Dispatcher may have been shutdown

2015-05-06 09:52:25,676 | DEBUG | Bundle Shutdown | southbound-impl | 191 - org.opendaylight.ovsdb.southbound-impl - 1.1.0.SNAPSHOT | BundleEvent STOPPING - org.opendaylight.ovsdb.southbound-impl
2015-05-06 09:52:25,676 | DEBUG | Bundle Shutdown | southbound-impl | 191 - org.opendaylight.ovsdb.southbound-impl - 1.1.0.SNAPSHOT | ServiceEvent UNREGISTERING -

{org.opendaylight.controller.config.spi.ModuleFactory}

=

{service.id=780}

- org.opendaylight.ovsdb.southbound-impl
2015-05-06 09:52:25,676 | DEBUG | Bundle Shutdown | southbound-impl | 191 - org.opendaylight.ovsdb.southbound-impl - 1.1.0.SNAPSHOT | BundleEvent STOPPED - org.opendaylight.ovsdb.southbound-impl
2015-05-06 09:52:30,930 | ERROR | Bundle Shutdown | AbstractMXBean | 107 - org.opendaylight.controller.sal-common-util - 1.2.0.SNAPSHOT | Failed when unregistering MBean {}



 Comments   
Comment by Flavio Fernandes [ 06/May/15 ]

Steps to reproduce:

start ovs, in my case, it is OVS 2.3.0, running at 192.168.50.4

run IT:

OVS_IP=192.168.50.4

cd ovsdb.git && cd southbound/southbound-it

mvn verify -Dit.test=SouthboundIT#testGetOvsdbNodes -Pintegrationtest -Dovsdbserver.ipaddress=${OVS_IP} -Dovsdbserver.port=6640 -nsu -o

Comment by Sharad Mishra [ 06/May/15 ]

This test is passing for me on OVS 2.3.1 and latest from ovs tip.

looks like there is a node already connected before the test starts. Can you rerun the test making sure that there is nothing attached to ovs.

$ sudo ovs-vsctl show
97c06d83-c5f1-4cd4-a4ff-ae702098d4c3
Manager "ptcp:6640"
ovs_version: "2.3.1-git3282e51"

Comment by Flavio Fernandes [ 06/May/15 ]

[11:13:27] <shague_> flaviof: did you attach the whole log or just the final assert failure? the rest of the log might have more info
[11:13:49] <flaviof> shague_: rgoulding: attaching the while log now.
[11:14:42] <flaviof> shague_: rgoulding: https://gist.github.com/704226de957a62b9df46
[11:15:39] <flaviof> shague_: rgoulding: I'm trying to attach debugger, but it does not seem to work. Does that work for you?
[11:16:05] <flaviof> cdovsdb && cd ./southbound/southbound-it ; mvn verify -Pintegrationtest -Dovsdbserver.ipaddress=192.168.50.4 -Dovsdbserver.port=6640 -nsu -o -Dit.test=SouthboundIT -DfailIfNoTests=false -Dmaven.surefire.debug -Dmaven.failsafe.debug
[11:16:37] <flaviof> that works if I use (non-southbound) integrationtest .
[11:23:05] <rgoulding> It looks like you ran out of PermGen space as well
[11:23:06] <SharadMishra> flaviof: rgoulding missed the discussion about 3140
[11:23:33] <SharadMishra> saw the email and tried on my setup with 2 different ovs versions (not 2.3.0), and it worked on both
[11:24:24] <SharadMishra> added my comments to the bug but looks like rgoulding already asked you the question I asked in my comment on bugzilla.
[11:25:09] <SharadMishra> flaviof: maybe the test before is not cleaning up the node
[11:26:42] <SharadMishra> flaviof: I am using the latest code, but have been running southbound-it for a week now, didn't come across this failure. maybe something to do with OVS 2.3.0
[11:32:06] <shague_> flaviof: in your log there is a first test testTerminationPointOfPortRequest that runs before testGetOvsdbNodes. i think that is the issue
[11:32:35] <shague_> at th end of the test it is supposed to disconnect but I don't see that in the code
[11:32:58] <shague_> so when testGetOvsdbNode runs it sees two nodes connected
[11:35:25] <shague_> but the jenkins job has the same behviour and it passes so that is weird
[11:35:51] <shague_> looks like all the new terminationpoint test cases do not disconnect after each test
[11:37:29] <flaviof> shague_: ack. thanks.
[11:37:53] <rgoulding> flaviof: do you want me to make that fix?
[11:38:02] <rgoulding> just add Assert.assertTrue(disconnectOvsdbNode(connectionInfo)); to each of them?
[11:38:15] <flaviof> rgoulding: sure; thanks!

Comment by Flavio Fernandes [ 06/May/15 ]

Fixed with gerrit:
https://git.opendaylight.org/gerrit/#/c/19727/

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