当前位置: 首页>>代码示例>>Java>>正文


Java JavaTestKit.shutdownActorSystem方法代码示例

本文整理汇总了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();
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:16,代码来源:DistributedShardedDOMDataTreeTest.java

示例2: teardown

import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void teardown() {
    JavaTestKit.shutdownActorSystem(node1);
    JavaTestKit.shutdownActorSystem(node2);
    node1 = null;
    node2 = null;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:8,代码来源:AbstractRpcTest.java

示例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);
        }
    }
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:38,代码来源:DistributedDataStoreRemotingIntegrationTest.java

示例4: tearDown

import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@After
public void tearDown() throws Exception {
    JavaTestKit.shutdownActorSystem(system);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:5,代码来源:ActorBehaviorTest.java

示例5: teardown

import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void teardown() {
    JavaTestKit.shutdownActorSystem(system);
    system = null;
}
 
开发者ID:ignasi35,项目名称:lagom-java-workshop,代码行数:6,代码来源:BasketEntityTest.java

示例6: tearDown

import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@After
public void tearDown() {
    JavaTestKit.shutdownActorSystem(actorSystem, Boolean.TRUE);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:5,代码来源:MessageSliceTest.java

示例7: teardown

import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void teardown() {
  JavaTestKit.shutdownActorSystem(system);
  system = null;
}
 
开发者ID:MarioAriasC,项目名称:lagomkotlin,代码行数:6,代码来源:HelloEntityTest.java

示例8: tearDownClass

import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() throws Exception {
    deleteJournal();
    JavaTestKit.shutdownActorSystem(system);
    system = null;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:7,代码来源:AbstractActorTest.java

示例9: tearDownClass

import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() throws IOException {
    JavaTestKit.shutdownActorSystem(system);
    system = null;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:6,代码来源:AbstractTransactionProxyTest.java

示例10: tearDownClass

import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() throws IOException {
    JavaTestKit.shutdownActorSystem(system, null, Boolean.TRUE);
    system = null;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:6,代码来源:AbstractClusterRefActorTest.java

示例11: tearDownClass

import akka.testkit.JavaTestKit; //导入方法依赖的package包/类
@AfterClass
public static void tearDownClass() {
    JavaTestKit.shutdownActorSystem(ACTOR_SYSTEM, Boolean.TRUE);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:5,代码来源:AbstractMessagingTest.java


注:本文中的akka.testkit.JavaTestKit.shutdownActorSystem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。