build fails with the following failure.
transaction id of the event can't be assumed to be 1 because other
tests may have created (subclass of) abstract event before running
this test. This patch to get transaction id from the event and use it
instead of hard-coded 1.
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec <<< FAILURE! - in org.opendaylight.ovsdb.openstack.netvirt.AbstractEventTest
> testAbstractEvent(org.opendaylight.ovsdb.openstack.netvirt.AbstractEventTest) Time elapsed: 0.017 sec <<< FAILURE!
> org.junit.ComparisonFailure: Error, toString() did not return the correct value expected:<...vent [transactionId=[1] handlerType=SOUTHBO...> but was:<...vent [transactionId=[5] handlerType=SOUTHBO...>
> at org.junit.Assert.assertEquals(Assert.java:115)
> at org.opendaylight.ovsdb.openstack.netvirt.AbstractEventTest.testAbstractEvent(AbstractEventTest.java:59)
Change-Id: I1f351b92a684e8ece17246d8f0011cbffe95409f
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
assertNotNull("Error, hashCode() did not return any value", abstractEvent1.hashCode());
assertEquals("Error, hashCode() is not consistent", abstractEvent2.hashCode(), abstractEvent3.hashCode());
+ int transactionId = abstractEvent1.getTransactionId();
assertEquals("Error, toString() did not return the correct value",
- "AbstractEvent [transactionId=1 handlerType=SOUTHBOUND action=DELETE]", abstractEvent1.toString());
+ "AbstractEvent [transactionId=" + transactionId + " handlerType=SOUTHBOUND action=DELETE]", abstractEvent1.toString());
}
}