- try (AbstractDataStore dataStore = setupDistributedDataStore(testName, false, shardName)) {
-
- // Create the write Tx
-
- final DOMStoreWriteTransaction writeTx = dataStore.newWriteOnlyTransaction();
- assertNotNull("newReadWriteTransaction returned null", writeTx);
-
- // Do some modifications and ready the Tx on a separate
- // thread.
-
- final AtomicReference<DOMStoreThreePhaseCommitCohort> txCohort = new AtomicReference<>();
- final AtomicReference<Exception> caughtEx = new AtomicReference<>();
- final CountDownLatch txReady = new CountDownLatch(1);
- Thread txThread = new Thread() {
- @Override
- public void run() {
- try {
- writeTx.write(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME));
-
- txCohort.set(writeTx.ready());
- } catch (Exception e) {
- caughtEx.set(e);
- return;
- } finally {
- txReady.countDown();
- }
- }
- };
+ final AbstractDataStore dataStore =
+ setupAbstractDataStore(testParameter, testName, false, shardName);