Package com.alibaba.wasp.fserver

Examples of com.alibaba.wasp.fserver.FServerServices


   */
  @Test
  public void testYankingEntityGroupFromUnderIt() throws IOException,
      NodeExistsException, KeeperException {
    final Server server = new MockServer(WTU);
    final FServerServices rss = new MockFServerServices();

    FTable htd = TEST_FTD;
    final EntityGroupInfo egi = TEST_EGI;
    EntityGroup entityGroup = EntityGroup.createEntityGroup(egi,
        WTU.getConfiguration(), htd, rss);
View Full Code Here


  }

  @Test
  public void testFailedOpenEntityGroup() throws Exception {
    Server server = new MockServer(WTU);
    FServerServices rsServices = new MockFServerServices();

    // Create it OFFLINE, which is what it expects
    ZKAssign.createNodeOffline(server.getZooKeeper(), TEST_EGI,
        server.getServerName());
View Full Code Here

  }

  @Test
  public void testFailedUpdateMeta() throws Exception {
    Server server = new MockServer(WTU);
    FServerServices rsServices = new MockFServerServices();

    // Create it OFFLINE, which is what it expects
    ZKAssign.createNodeOffline(server.getZooKeeper(), TEST_EGI,
        server.getServerName());
View Full Code Here

   */
  @Test
  public void testFailedCommitAborts() throws IOException, NodeExistsException,
      KeeperException {
    final Server server = new MockServer(WTU, false);
    final FServerServices rss = new MockFServerServices();
    FTable wtd = TEST_FTD;
    final EntityGroupInfo egi = new EntityGroupInfo(wtd.getTableName(),
        FConstants.EMPTY_END_ROW, FConstants.EMPTY_END_ROW);
    EntityGroup entityGroup = EntityGroup.createEntityGroup(egi,
        WTU.getConfiguration(), wtd, rss);
    try {
      assertNotNull(entityGroup);
      // Spy on the entityGroup so can throw exception when close is called.
      EntityGroup spy = Mockito.spy(entityGroup);
      final boolean abort = false;
      Mockito.when(spy.close(abort)).thenThrow(
          new RuntimeException("Mocked failed close!"));
      rss.addToOnlineEntityGroups(spy);
      assertFalse(server.isStopped());
      CloseEntityGroupHandler handler = new CloseEntityGroupHandler(server,
          rss, egi, false, false, -1, EventType.M_FSERVER_CLOSE_ENTITYGROUP);
      boolean throwable = false;
      try {
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.fserver.FServerServices

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.