本文整理汇总了Java中akka.testkit.JavaTestKit.shutdownActorSystem方法的典型用法代码示例。如果您正苦于以下问题:Java JavaTestKit.shutdownActorSystem方法的具体用法?Java JavaTestKit.shutdownActorSystem怎么用?Java JavaTestKit.shutdownActorSystem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类akka.testkit.JavaTestKit
的用法示例。
在下文中一共展示了JavaTestKit.shutdownActorSystem方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: tearDown
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@After
public void tearDown() throws Exception {
if (leaderDistributedDataStore != null) {
leaderDistributedDataStore.close();
}
if (operDistributedDatastore != null) {
operDistributedDatastore.close();
}
JavaTestKit.shutdownActorSystem(leaderSystem);
InMemoryJournal.clear();
InMemorySnapshotStore.clear();
}
示例2: teardown
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void teardown() {
JavaTestKit.shutdownActorSystem(node1);
JavaTestKit.shutdownActorSystem(node2);
node1 = null;
node2 = null;
}
示例3: testTransactionWithCreateTxFailureDueToNoLeader
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@Test
public void testTransactionWithCreateTxFailureDueToNoLeader() throws Exception {
followerDatastoreContextBuilder.frontendRequestTimeoutInSeconds(2);
initDatastoresWithCars("testTransactionWithCreateTxFailureDueToNoLeader");
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
readTx.read(CarsModel.BASE_PATH).checkedGet(5, TimeUnit.SECONDS);
// Shutdown the leader and try to create a new tx.
JavaTestKit.shutdownActorSystem(leaderSystem, null, true);
Cluster.get(followerSystem).leave(MEMBER_1_ADDRESS);
Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
sendDatastoreContextUpdate(followerDistributedDataStore, followerDatastoreContextBuilder
.operationTimeoutInMillis(10).shardElectionTimeoutFactor(1).customRaftPolicyImplementation(null));
final DOMStoreReadWriteTransaction rwTx = followerDistributedDataStore.newReadWriteTransaction();
rwTx.write(CarsModel.BASE_PATH, CarsModel.emptyContainer());
try {
followerTestKit.doCommit(rwTx.ready());
fail("Exception expected");
} catch (final ExecutionException e) {
final String msg = "Unexpected exception: " + Throwables.getStackTraceAsString(e.getCause());
if (DistributedDataStore.class.equals(testParameter)) {
assertTrue(msg, Throwables.getRootCause(e) instanceof NoShardLeaderException);
} else {
assertTrue(msg, Throwables.getRootCause(e) instanceof RequestTimeoutException);
}
}
}
示例4: tearDown
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@After
public void tearDown() throws Exception {
JavaTestKit.shutdownActorSystem(system);
}
示例5: teardown
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void teardown() {
JavaTestKit.shutdownActorSystem(system);
system = null;
}
示例6: tearDown
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@After
public void tearDown() {
JavaTestKit.shutdownActorSystem(actorSystem, Boolean.TRUE);
}
示例7: teardown
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void teardown() {
JavaTestKit.shutdownActorSystem(system);
system = null;
}
示例8: tearDownClass
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() throws Exception {
deleteJournal();
JavaTestKit.shutdownActorSystem(system);
system = null;
}
示例9: tearDownClass
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() throws IOException {
JavaTestKit.shutdownActorSystem(system);
system = null;
}
示例10: tearDownClass
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() throws IOException {
JavaTestKit.shutdownActorSystem(system, null, Boolean.TRUE);
system = null;
}
示例11: tearDownClass
import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() {
JavaTestKit.shutdownActorSystem(ACTOR_SYSTEM, Boolean.TRUE);
}