Example #1
0
  /** Test the "remote-write local-read" pipe. */
  public void testRemoteWrite() throws Exception {
    Pipe p = Pipe.createRemoteToLocal();
    Future<Integer> f = channel.callAsync(new WritingCallable(p));

    read(p);

    int r = f.get();
    System.out.println("result=" + r);
    assertEquals(5, r);
  }