/**
   * This runs through some simple tests of the MemcacheClient.
   *
   * <p>Command line args: args[0] = number of threads to spawn args[1] = number of runs per thread
   * args[2] = size of object to store
   *
   * @param args the command line arguments
   */
  public static void main(String[] args) {
    if (!UnitTests.class.desiredAssertionStatus()) {
      System.err.println("WARNING: assertions are disabled!");
      try {
        Thread.sleep(3000);
      } catch (InterruptedException e) {
      }
    }

    String[] serverlist = {
      "192.168.1.50:1620",
      "192.168.1.50:1621",
      "192.168.1.50:1622",
      "192.168.1.50:1623",
      "192.168.1.50:1624",
      "192.168.1.50:1625",
      "192.168.1.50:1626",
      "192.168.1.50:1627",
      "192.168.1.50:1628",
      "192.168.1.50:1629"
    };

    Integer[] weights = {1, 1, 1, 1, 10, 5, 1, 1, 1, 3};

    if (args.length > 0) serverlist = args;

    // initialize the pool for memcache servers
    SockIOPool pool = SockIOPool.getInstance("test");
    pool.setServers(serverlist);
    pool.setWeights(weights);
    pool.setMaxConn(250);
    pool.setNagle(false);
    pool.setHashingAlg(SockIOPool.CONSISTENT_HASH);
    pool.initialize();

    mc = new MemcachedClient("test");
    runAlTests(mc);
  }