diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2016-10-24 13:02:59 +0200 |
---|---|---|
committer | Maros Marsalek <mmarsale@cisco.com> | 2016-10-24 17:33:24 +0200 |
commit | bb090e1254eacc95d7bd1dd45f6311967f81af86 (patch) | |
tree | 101df09cd4b8adad9d083a00442aecf90e9d9948 /infra/translate-api/src/test/java | |
parent | 81c7ae0e263515b5bf8acb59b06d61ba446b8f0b (diff) |
HONEYCOMB-255 - Cutting identifiers to prevent failing of reverts
Mapping allready processes changes for reverting by InstanceIdentifier
instead of using KeyedInstanceIdentifier(to prevent failing to identify
handleable nodes)
Modified logging to prevent double/triple logging of detailed cause
of failed bulk update
Reusing WriteContext for revert(removed try with resource to prevent
closing of write context before revert)
Change-Id: Ie939ebe443629f9cdad5b5b449aa8c5dac40ea67
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'infra/translate-api/src/test/java')
-rw-r--r-- | infra/translate-api/src/test/java/io/fd/honeycomb/translate/write/registry/BulkUpdateExceptionTest.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/infra/translate-api/src/test/java/io/fd/honeycomb/translate/write/registry/BulkUpdateExceptionTest.java b/infra/translate-api/src/test/java/io/fd/honeycomb/translate/write/registry/BulkUpdateExceptionTest.java index c1880ca26..ae0c36d5b 100644 --- a/infra/translate-api/src/test/java/io/fd/honeycomb/translate/write/registry/BulkUpdateExceptionTest.java +++ b/infra/translate-api/src/test/java/io/fd/honeycomb/translate/write/registry/BulkUpdateExceptionTest.java @@ -20,6 +20,7 @@ import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.verify; import com.google.common.collect.Sets; +import io.fd.honeycomb.translate.write.WriteContext; import java.util.HashSet; import org.junit.Before; import org.junit.Test; @@ -31,6 +32,10 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class BulkUpdateExceptionTest { private InstanceIdentifier<?> id = InstanceIdentifier.create(DataObject.class); + + @Mock + private WriteContext writeContext; + @Mock private WriterRegistry.Reverter reverter; @@ -47,7 +52,7 @@ public class BulkUpdateExceptionTest { assertEquals(failedIds, bulkUpdateException.getFailedIds()); - bulkUpdateException.revertChanges(); - verify(reverter).revert(); + bulkUpdateException.revertChanges(writeContext); + verify(reverter).revert(writeContext); } }
\ No newline at end of file |