Package org.serviceconnector.api

Examples of org.serviceconnector.api.SCMessage


   * Expectation: passes
   */
  @Test
  public void t05_cc_initialLargeData3AppendixReplaceByInitialData() throws Exception {
    // 1: load initial data to cache (cid=700)
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("cache10MBStringFor1Hour_managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: verify data is in top level cache
    Map<String, String> inspectResponse = mgmtClient.inspectCache("700");
    this.checkCacheInspectString(inspectResponse, "success", SC_CACHE_ENTRY_STATE.LOADED, "700", "0", "700/0/0=51&", "unset");
View Full Code Here


   * Expectation: passes
   */
  @Test
  public void t06_cc_initialLargeDataNoExpirationRemove() throws Exception {
    // 1: load initial data to cache (cid=700), static - no expiration time
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("staticLargeData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: verify data is in top level cache
    Map<String, String> inspectResponse = mgmtClient.inspectCache("700");
    this.checkCacheInspectString(inspectResponse, "success", SC_CACHE_ENTRY_STATE.LOADED, "700", "0", "700/0/0=1&", "static");
View Full Code Here

   * Expectation: passes
   */
  @Test
  public void t07_cc_initialLargeDataNoExpiration3LargeAppendix() throws Exception {
    // 1: load initial data to cache (cid=700), static - no expiration time
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("staticLargeData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: verify data is in top level cache
    Map<String, String> inspectResponse = mgmtClient.inspectCache("700");
    this.checkCacheInspectString(inspectResponse, "success", SC_CACHE_ENTRY_STATE.LOADED, "700", "0", "700/0/0=1&", "static");
View Full Code Here

   * Expectation: passes
   */
  @Test
  public void t08_cc_initialLargeDataNoExpirationInitial() throws Exception {
    // 1: load initial data to cache (cid=700), static - no expiration time
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("staticLargeData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: verify data is in top level cache
    Map<String, String> inspectResponse = mgmtClient.inspectCache("700");
    this.checkCacheInspectString(inspectResponse, "success", SC_CACHE_ENTRY_STATE.LOADED, "700", "0", "700/0/0=1&", "static");
View Full Code Here

   * Expectation: passes
   */
  @Test
  public void t11b_cc_Publish3LargeAppendixNoManagedDataInCache() throws Exception {
    // 1: load large data to cache (cid=700) - unmanaged
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("hello world");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - publish 3 Appendix!
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
View Full Code Here

   * Expectation: passes
   */
  @Test
  public void t13_cc_Publish50Appendix() throws Exception {
    // 1: load large data (10MB) to cache (cid=700)
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("cache10MBStringFor1Hour_managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - publish 50 large appendix
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
View Full Code Here

   * Expectation: passes
   */
  @Test
  public void t14_cc_smallInitialSmallInitial() throws Exception {
    // 1: load initial data to cache (cid=700)
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: verify data is in top level cache
    Map<String, String> inspectResponse = mgmtClient.inspectCache("700");
    this.checkCacheInspectString(inspectResponse, "success", SC_CACHE_ENTRY_STATE.LOADED, "700", "0", "700/0/0=0&", "unset");
View Full Code Here

   * Expectation: passes
   */
  @Test
  public void t15_cc_smallInitialLargeInitial() throws Exception {
    // 1: load initial data to cache (cid=700)
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: verify data is in top level cache
    Map<String, String> inspectResponse = mgmtClient.inspectCache("700");
    this.checkCacheInspectString(inspectResponse, "success", SC_CACHE_ENTRY_STATE.LOADED, "700", "0", "700/0/0=0&", "unset");
View Full Code Here

   * Expectation: passes
   */
  @Test
  public void t16_cc_smallInitial10BMInitial() throws Exception {
    // 1: load initial data to cache (cid=700)
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: verify data is in top level cache
    Map<String, String> inspectResponse = mgmtClient.inspectCache("700");
    this.checkCacheInspectString(inspectResponse, "success", SC_CACHE_ENTRY_STATE.LOADED, "700", "0", "700/0/0=0&", "unset");
View Full Code Here

   * Expectation: passes
   */
  @Test
  public void t17_cc_10MBInitial3LargeAppendix1LargeInitial() throws Exception {
    // 1: load large data (10MB) to cache (cid=700)
    SCMessage request = new SCMessage();
    request.setCacheId("700");
    request.setData("cache10MBStringFor1Hour_managedData");
    request.setMessageInfo(TestConstants.cacheCmd);
    sessionService1.execute(request);

    // 2: start cache guardian - publish 3 large Appendix (2 parts each) & 1 large initial
    SCSubscribeMessage subMsg = new SCSubscribeMessage();
    subMsg.setMask(TestConstants.mask);
    subMsg.setSessionInfo(TestConstants.publish3LargeAppendix1LargeInitialMsgCmd);
    subMsg.setData("700");
    guardianClient.startCacheGuardian(TestConstants.cacheGuardian1, subMsg, cacheGuardianCbk);

    // 3: verify callback retrieval - 3 appendix within 10sec
    cacheGuardianCbk.waitForAppendMessage(3, 10);

    // 4: verify callback retrieval - 1 initial within 10sec
    cacheGuardianCbk.waitForMessage(1, 10);

    // 5: read data from cache and verify
    SCMessage response = sessionService1.execute(request);
    this.checkAppendices(response, 0);

    // 6: verify data is in top level cache
    Map<String, String> inspectResponse = mgmtClient.inspectCache("700");
    this.checkCacheInspectString(inspectResponse, "success", SC_CACHE_ENTRY_STATE.LOADED, "700", "0", "700/0/0=1&",
View Full Code Here

TOP

Related Classes of org.serviceconnector.api.SCMessage

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.