Bug 2337: Fix Tx already sealed failure on Tx commit 81/12581/2
authortpantelis <tpanteli@brocade.com>
Sat, 1 Nov 2014 21:55:34 +0000 (17:55 -0400)
committertpantelis <tpanteli@brocade.com>
Sun, 2 Nov 2014 02:53:16 +0000 (22:53 -0400)
commit1a8ace932ef318601c17e0fa52b0a9dbd02e3005
treef27c7eb44278b07e94af9f51a11ee6250f336dc7
parent152cf011779bd9b45c91d62697132fef36d3ac63
Bug 2337: Fix Tx already sealed failure on Tx commit

Details outlined in bug 2337.

Moved the publishing of the TransactonContext instance in
TransactionFutureCallback#onComplete after the cached operations are
executed.

Also fixed a timing issue in
DistributedDataStoreIntegrationTest#testChangeListenerRegistration that
caused intermittent failures. This was an issue with the test. The
listener registration is done async in the shard so the notification for
the first write commit could occur in the initial notification on
registration which screwed up the test. So I moved the first write
commit before the registration so we expect an initial notification.

Change-Id: Ied2af93be8165208b853c48e57312c3a5acbdaea
Signed-off-by: tpantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/MockDataChangeListener.java