Package net.rubyeye.xmemcached.test.unittest

Examples of net.rubyeye.xmemcached.test.unittest.MockSession


    this.locator = new KetamaMemcachedSessionLocator();
  }

  @Test
  public void testGetSessionByKey_MoreSessions() {
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8081);
    MockSession session3 = new MockSession(8082);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session2);
    list.add(session3);
    this.locator.updateSessions(list);
View Full Code Here


  }

  @Test
  public void testGetSessionByKey_MoreSessions_OneClosed() {
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8081);
    session1.close();
    MockSession session3 = new MockSession(8082);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session2);
    list.add(session3);
    this.locator.updateSessions(list);
View Full Code Here

  }

  @Test
  public void testGetSessionByKey_MoreSessions_OneClosed_FailureMode() {
    this.locator.setFailureMode(true);
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8081);
    session1.close();
    MockSession session3 = new MockSession(8082);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session2);
    list.add(session3);
    this.locator.updateSessions(list);
View Full Code Here

    this.locator = new ArrayMemcachedSessionLocator();
  }

  @Test
  public void testGetSessionByKey_MoreSessions() {
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8080);
    MockSession session3 = new MockSession(8080);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session2);
    list.add(session3);
    this.locator.updateSessions(list);
View Full Code Here

  }

  @Test
  public void testGetSessionByKey_MoreSessions_OneClosed() {
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8080);
    session2.close();
    MockSession session3 = new MockSession(8080);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session2);
    list.add(session3);
    this.locator.updateSessions(list);
View Full Code Here

  }

  @Test
  public void testGetSessionByKey_MoreSessions_OneClosed_FailureMode() {
    this.locator.setFailureMode(true);
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8080);
    session2.close();
    MockSession session3 = new MockSession(8080);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session2);
    list.add(session3);
    this.locator.updateSessions(list);
View Full Code Here

    this.locator = new ArrayMemcachedSessionLocator();
  }
 
  @Test
  public void testGetSessionByKey_SessionPool() {
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8081);
    MockSession session3 = new MockSession(8082);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session1);
    list.add(session1);
    list.add(session2);
View Full Code Here

  }

  @Test
  public void testGetSessionByKey_MoreSessions() {
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8081);
    MockSession session3 = new MockSession(8082);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session2);
    list.add(session3);
    this.locator.updateSessions(list);
View Full Code Here

  }

  @Test
  public void testGetSessionByKey_MoreSessions_OneClosed() {
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8081);
    session2.close();
    MockSession session3 = new MockSession(8082);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session2);
    list.add(session3);
    this.locator.updateSessions(list);
View Full Code Here

  }

  @Test
  public void testGetSessionByKey_MoreSessions_OneClosed_FailureMode() {
    this.locator.setFailureMode(true);
    MockSession session1 = new MockSession(8080);
    MockSession session2 = new MockSession(8081);
    session2.close();
    MockSession session3 = new MockSession(8082);
    List<Session> list = new ArrayList<Session>();
    list.add(session1);
    list.add(session2);
    list.add(session3);
    this.locator.updateSessions(list);
View Full Code Here

TOP

Related Classes of net.rubyeye.xmemcached.test.unittest.MockSession

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.