Package org.serviceconnector.api.cln

Examples of org.serviceconnector.api.cln.SCMgmtClient


   * Description: attach after SC was restarted<br>
   * Expectation: will pass because this is the first time
   */
  @Test
  public void t101_attachAfterRestart() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);

    ctrl.stopSC(scCtx);
    scCtx = ctrl.startSC(TestConstants.SC0, TestConstants.log4jSC0Properties, TestConstants.SC0Properties);

    client.attach();
View Full Code Here


   * Description: attach after detach and SC was restarted<br>
   * Expectation: will pass because the pool was been cleaned up
   */
  @Test
  public void t102_attachAfterRestart() 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());
    client.detach();

    ctrl.stopSC(scCtx);
View Full Code Here

   * Description: client remains attached after SC was restarted<br>
   * Expectation: will pass because the "attached" flag is set locally
   */
  @Test
  public void t103_stopAfterAttach() 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);
    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 t104_detachAfterRestart() 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);
    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 t105_enableServiceAfterRestart() 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);
    scCtx = ctrl.startSC(TestConstants.SC0, TestConstants.log4jSC0Properties, TestConstants.SC0Properties);
View Full Code Here

   * Description: disable service after SC was restarted<br>
   * Expectation: passes, because new connection is created
   */
  @Test
  public void t106_disableServiceAfterRestart() 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);
    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 t107_getWorkloadAfterRestart() 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);
    scCtx = ctrl.startSC(TestConstants.SC0, TestConstants.log4jSC0Properties, TestConstants.SC0Properties);
View Full Code Here

   * Description: attach after SC was restarted<br>
   * Expectation: will pass because this is the first time
   */
  @Test
  public void t201_attachAfterRestart() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);

    ctrl.stopSC(scCtx);
    scCtx = ctrl.startSC(TestConstants.SC0, TestConstants.log4jSC0Properties, TestConstants.SC0Properties);

    client.attach();
View Full Code Here

   * Description: attach after detach and SC was restarted<br>
   * Expectation: will pass because the pool was cleaned up
   */
  @Test
  public void t202_attachAfterRestart() 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());
    ;
    client.detach();

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();

    // execute
    request.setMessageInfo(TestConstants.echoCmd);
    response = sessionService1.execute(request);
    Assert.assertEquals("message body is not the same length", request.getDataLength(), response.getDataLength());
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.