diff options
author | 2016-05-09 10:13:24 +0200 | |
---|---|---|
committer | 2016-05-09 12:44:43 +0200 | |
commit | 6627d1ff52b6df780bac4a6f56a3f4587ee4847b (patch) | |
tree | 6dee5f3d2580243cd7584099e4c521a69689a65b /v3po/v3po2vpp/src/test/java | |
parent | 4dcba2bceea09e6da71d6191df06d7d0201e699b (diff) |
Comment out equality check in AbstractCompositeWriter.updateCurrent
There is a bug in ODL when checking auguments for equality:
https://git.opendaylight.org/gerrit/#/c/37719
Until the bug is fixed, updateCurrentAttributes will be invoked
even if there was no data change. It is customizer responsibility
to perform equality check if invoking update without actual data
change can cause side-effects in VPP.
Change-Id: Id72ec55ea7179330a4ebb1df49c29195908c5461
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizerTest.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizerTest.java index 5d5781adb..6e449070f 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizerTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vpp/BridgeDomainCustomizerTest.java @@ -239,10 +239,11 @@ public class BridgeDomainCustomizerTest { @Test public void testUpdateUnknownBridgeDomain() throws Exception { final String bdName = "bd1"; - final BridgeDomain bd = generateBridgeDomain("bd1"); + final BridgeDomain bdBefore = generateBridgeDomain(bdName, 0, 1, 0 ,1, 0); + final BridgeDomain bdAfter = generateBridgeDomain(bdName, 1, 1, 0 ,1, 0); try { - customizer.updateCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, bd, ctx); + customizer.updateCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bdBefore, bdAfter, ctx); } catch (IllegalArgumentException e) { verify(api, never()).bridgeDomainAddDel(any(BridgeDomainAddDel.class)); return; @@ -254,15 +255,16 @@ public class BridgeDomainCustomizerTest { public void testUpdateBridgeDomainFailed() throws Exception { final int bdId = 1; final String bdName = "bd1"; - final BridgeDomain bd = generateBridgeDomain(bdName); + final BridgeDomain bdBefore = generateBridgeDomain(bdName, 0, 1, 0 ,1, 0); + final BridgeDomain bdAfter = generateBridgeDomain(bdName, 1, 1, 0 ,1, 0); namingContext.addName(bdId, bdName); whenBridgeDomainAddDelThenFailure(); try { - customizer.updateCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bd, bd, ctx); + customizer.updateCurrentAttributes(BridgeDomainTestUtils.bdIdentifierForName(bdName), bdBefore, bdAfter, ctx); } catch (WriteFailedException.UpdateFailedException e) { - verifyBridgeDomainAddOrUpdateWasInvoked(bd, bdId); + verifyBridgeDomainAddOrUpdateWasInvoked(bdAfter, bdId); return; } fail("IllegalStateException was expected"); |