Package org.apache.avro.test

Examples of org.apache.avro.test.Simple


  @Test(expected = Exception.class)
  public void testConnectionRefusedOneWay() throws IOException {
    Transceiver client = new HttpTransceiver(new URL("http://localhost:4444"));
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    Simple proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
    proxy.ack();
  }
View Full Code Here


    public void testTimeout() throws Throwable {
    ServerSocket s = new ServerSocket(0);
    HttpTransceiver client =
      new HttpTransceiver(new URL("http://127.0.0.1:"+s.getLocalPort()+"/"));
    client.setTimeout(100);
    Simple proxy = SpecificRequestor.getClient(Simple.class, client);
    try {
      proxy.hello("foo");
    } catch (UndeclaredThrowableException e) {
      throw e.getCause();
    } finally {
      s.close();
    }
View Full Code Here

    public void testTimeout() throws Throwable {
    ServerSocket s = new ServerSocket(0);
    HttpTransceiver client =
      new HttpTransceiver(new URL("http://127.0.0.1:"+s.getLocalPort()+"/"));
    client.setTimeout(100);
    Simple proxy = SpecificRequestor.getClient(Simple.class, client);
    try {
      proxy.hello("foo");
    } catch (AvroRemoteException e) {
      throw e.getCause();
    } finally {
      s.close();
    }
View Full Code Here

  @Test(expected = Exception.class)
  public void testConnectionRefusedOneWay() throws IOException {
    Transceiver client = new HttpTransceiver(new URL("http://localhost:4444"));
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    Simple proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
    proxy.ack();
  }
View Full Code Here

  @Test(expected = Exception.class)
  public void testConnectionRefusedOneWay() throws IOException {
    Transceiver client = new HttpTransceiver(new URL("http://localhost:4444"));
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    Simple proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
    proxy.ack();
  }
View Full Code Here

  @Test(expected = Exception.class)
  public void testConnectionRefusedOneWay() throws IOException {
    Transceiver client = new HttpTransceiver(new URL("http://localhost:4444"));
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    Simple proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
    proxy.ack();
  }
View Full Code Here

TOP

Related Classes of org.apache.avro.test.Simple

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.