X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FShardTransactionFailureTest.java;h=c3f66fb8e3d5554779c501f4fa80828b270edf0a;hb=fd38fb36d0992a3a2391837f6e12615ed98a8bb5;hp=e45389f5f36fbd151a24ae9e4d5a02a4995a2772;hpb=a54ec60368110d22794602343c934902f6833c65;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java index e45389f5f3..c3f66fb8e3 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java @@ -1,11 +1,9 @@ /* + * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. * - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.controller.cluster.datastore; @@ -14,10 +12,8 @@ import akka.actor.ActorRef; import akka.actor.Props; import akka.pattern.AskTimeoutException; import akka.testkit.TestActorRef; -import java.util.Collections; import java.util.concurrent.TimeUnit; import org.junit.Test; -import org.opendaylight.controller.cluster.datastore.TransactionProxy.TransactionType; import org.opendaylight.controller.cluster.datastore.identifiers.ShardIdentifier; import org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard.ShardStats; import org.opendaylight.controller.cluster.datastore.node.utils.serialization.NormalizedNodeSerializer; @@ -55,8 +51,8 @@ public class ShardTransactionFailureTest extends AbstractActorTest { private final ShardStats shardStats = new ShardStats(SHARD_IDENTIFIER.toString(), "DataStore"); private ActorRef createShard(){ - return getSystem().actorOf(Shard.props(SHARD_IDENTIFIER, Collections.emptyMap(), datastoreContext, - TestModel.createTestContext())); + return getSystem().actorOf(Shard.builder().id(SHARD_IDENTIFIER).datastoreContext(datastoreContext). + schemaContext(TestModel.createTestContext()).props()); } @Test(expected = ReadFailedException.class) @@ -210,7 +206,7 @@ public class ShardTransactionFailureTest extends AbstractActorTest { Await.result(future, Duration.create(3, TimeUnit.SECONDS)); } - private NormalizedNodeMessages.Node buildNormalizedNode() { + private static NormalizedNodeMessages.Node buildNormalizedNode() { return NormalizedNodeSerializer .serialize(Builders.containerBuilder().withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)).build()); }