+ Await.result(future, Duration.create(3, TimeUnit.SECONDS));
+ }
+
+ @Test(expected = ReadFailedException.class)
+ public void testNegativeExistsWithReadWriteTransactionClosed()
+ throws Throwable {
+
+ final ActorRef shard = createShard();
+ final Props props = ShardTransaction.props(RW, store.newReadWriteTransaction("test-txn", null), shard,
+ datastoreContext, shardStats, "txn", DataStoreVersions.CURRENT_VERSION);
+
+ final TestActorRef<ShardTransaction> subject = TestActorRef
+ .create(getSystem(), props,
+ "testNegativeExistsWithReadWriteTransactionClosed");
+
+ ShardTransactionMessages.DataExists dataExists =
+ ShardTransactionMessages.DataExists.newBuilder()
+ .setInstanceIdentifierPathArguments(
+ NormalizedNodeMessages.InstanceIdentifier.newBuilder()
+ .build()
+ ).build();