Package org.serviceconnector.api.cln

Examples of org.serviceconnector.api.cln.SCMgmtClient


   * Description: client remains attached after SC was restarted<br>
   * Expectation: will pass because the "attached" flag is set locally
   */
  @Test
  public void t203_stopAfterAttach() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    client.attach();
    Assert.assertEquals("Client is not attached", true, client.isAttached());

    ctrl.stopSC(scCtx);
    scCtx = ctrl.startSC(TestConstants.SC0, TestConstants.log4jSC0Properties, TestConstants.SC0Properties);
View Full Code Here


   * Description: detach after SC was restarted<br>
   * Expectation: passes
   */
  @Test
  public void t204_detachAfterRestart() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    client.attach();
    Assert.assertEquals("Client is not attached", true, client.isAttached());

    ctrl.stopSC(scCtx);
    scCtx = ctrl.startSC(TestConstants.SC0, TestConstants.log4jSC0Properties, TestConstants.SC0Properties);
View Full Code Here

   * Description: enable service after SC was restarted<br>
   * Expectation: passes, because new connection is created
   */
  @Test
  public void t205_enableServiceAfterRestart() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    client.attach();
    Assert.assertEquals("Client is not attached", true, client.isAttached());

    ctrl.stopSC(scCtx);
    scCtx = ctrl.startSC(TestConstants.SC0, TestConstants.log4jSC0Properties, TestConstants.SC0Properties);
View Full Code Here

    sessionService1 = client.newSessionService(TestConstants.sesServiceName1);
    msgCallback1 = new MsgCallback(sessionService1);
    response = sessionService1.createSession(request, msgCallback1);

    // disable service
    SCMgmtClient clientMgmt = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    clientMgmt.attach();
    clientMgmt.disableService(TestConstants.sesServiceName1);
    clientMgmt.detach();

    // send
    request.setMessageInfo(TestConstants.echoCmd);
    sessionService1.send(request);
    msgCallback1.waitForMessage(10);
View Full Code Here

   * Description: disable service after SC was restarted<br>
   * Expectation: passes, because new connection is created
   */
  @Test
  public void t206_disableServiceAfterRestart() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    client.attach();
    Assert.assertEquals("Client is not attached", true, client.isAttached());

    ctrl.stopSC(scCtx);
    scCtx = ctrl.startSC(TestConstants.SC0, TestConstants.log4jSC0Properties, TestConstants.SC0Properties);
View Full Code Here

   * Description: getWorkload after SC was restarted<br>
   * Expectation: passes, because new connection is created
   */
  @Test
  public void t207_getWorkloadAfterRestart() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    client.attach();
    Assert.assertEquals("Client is not attached", true, client.isAttached());

    ctrl.stopSC(scCtx);
    scCtx = ctrl.startSC(TestConstants.SC0, TestConstants.log4jSC0Properties, TestConstants.SC0Properties);
View Full Code Here

   * Description: attach after SC was aborted<br>
   * Expectation:  throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t101_attachAfterAbort() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
   
    ctrl.stopSC(scCtx);
   
    client.attach();
  }
View Full Code Here

   * Description: detach after SC was aborted<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t102_detachAfterAbort() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    Assert.assertEquals("Client is not attached", true, client.isAttached());
   
    ctrl.stopSC(scCtx);
   
View Full Code Here

   * Description: enable service after SC was aborted<br>
   * Expectation:  throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t103_enableServiceAfterAbort() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    Assert.assertEquals("Client is not attached", true, client.isAttached());
   
    ctrl.stopSC(scCtx);
   
View Full Code Here

   * Description: disable service after SC was aborted<br>
   * Expectation:  throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t104_disableServiceAfterAbort() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    Assert.assertEquals("Client is not attached", true, client.isAttached());
   
    ctrl.stopSC(scCtx);
   
View Full Code Here

TOP

Related Classes of org.serviceconnector.api.cln.SCMgmtClient

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.