private void testClientReconnectRequest(String srvCfg,String srvCfg2,String clientCfg) throws Exception {
  Server srv=null;
  Ignite ignite=Ignition.start(srvCfg);
  try {
    srv=startServer(TEST_JETTY_PORT,clientCfg,"client",new SessionCreateServlet(keepBinary()));
    URL url=new URL("http://localhost:" + TEST_JETTY_PORT + "/ignitetest/test");
    URLConnection conn=url.openConnection();
    conn.connect();
    try (BufferedReader rdr=new BufferedReader(new InputStreamReader(conn.getInputStream()))){
      String sesId=rdr.readLine();
      assertNotNull(sesId);
    }
     stopGrid(ignite.name());
    ignite=Ignition.start(srvCfg);
    conn=url.openConnection();
    conn.connect();
    try (BufferedReader rdr=new BufferedReader(new InputStreamReader(conn.getInputStream()))){
      String sesId=rdr.readLine();
      assertNotNull(sesId);
    }
     Ignite ignite2=Ignition.start(srvCfg2);
    stopGrid(ignite.name());
    conn=url.openConnection();
    conn.connect();
    try (BufferedReader rdr=new BufferedReader(new InputStreamReader(conn.getInputStream()))){
      String sesId=rdr.readLine();
      assertNotNull(sesId);
    }
   }
  finally {
    stopServer(srv);
    stopAllGrids();
  }
}

private void testClientReconnectRequest ( String srvCfg , String srvCfg2 , String clientCfg ) throws Exception { Server srv = null ; Ignite ignite = Ignition . start ( srvCfg ) ; try { srv = startServer ( TEST_JETTY_PORT , clientCfg , "client" , new SessionCreateServlet ( keepBinary ( ) ) ) ; URL url = new URL ( "http://localhost:" + TEST_JETTY_PORT + "/ignitetest/test" ) ; URLConnection conn = url . openConnection ( ) ; conn . connect ( ) ; try ( BufferedReader rdr = new BufferedReader ( new InputStreamReader ( conn . getInputStream ( ) ) ) ) { String sesId = rdr . readLine ( ) ; assertNotNull ( sesId ) ; } stopGrid ( ignite . name ( ) ) ; ignite = Ignition . start ( srvCfg ) ; conn = url . openConnection ( ) ; conn . connect ( ) ; try ( BufferedReader rdr = new BufferedReader ( new InputStreamReader ( conn . getInputStream ( ) ) ) ) { String sesId = rdr . readLine ( ) ; assertNotNull ( sesId ) ; } Ignite ignite2 = Ignition . start ( srvCfg2 ) ; stopGrid ( ignite . name ( ) ) ; conn = url . openConnection ( ) ; conn . connect ( ) ; try ( BufferedReader rdr = new BufferedReader ( new InputStreamReader ( conn . getInputStream ( ) ) ) ) { String sesId = rdr . readLine ( ) ; assertNotNull ( sesId ) ; } } finally { stopServer ( srv ) ; stopAllGrids ( ) ; } }
tests single request to a server . checks the presence of session in cache .
