Examples of LocalChannel


Examples of hudson.remoting.LocalChannel

        }
    }

    @Bug(11073)
    public void testIsUnix() {
        FilePath winPath = new FilePath(new LocalChannel(null),
                " c:\\app\\hudson\\workspace\\3.8-jelly-db\\jdk/jdk1.6.0_21/label/sqlserver/profile/sqlserver\\acceptance-tests\\distribution.zip");
        assertFalse(winPath.isUnix());

        FilePath base = new FilePath(new LocalChannel(null),
                "c:\\app\\hudson\\workspace\\3.8-jelly-db");
        FilePath middle = new FilePath(base, "jdk/jdk1.6.0_21/label/sqlserver/profile/sqlserver");
        FilePath full = new FilePath(middle, "acceptance-tests\\distribution.zip");
        assertFalse(full.isUnix());
       
       
        FilePath unixPath = new FilePath(new LocalChannel(null),
                "/home/test");
        assertTrue(unixPath.isUnix());
    }
View Full Code Here

Examples of hudson.remoting.LocalChannel

        }
    }

    @Bug(13649)
    public void testMultiSegmentRelativePaths() throws Exception {
        FilePath winPath = new FilePath(new LocalChannel(null), "c:\\app\\jenkins\\workspace");
        FilePath nixPath = new FilePath(new LocalChannel(null), "/opt/jenkins/workspace");

        assertEquals("c:\\app\\jenkins\\workspace\\foo\\bar\\manchu", new FilePath(winPath, "foo/bar/manchu").getRemote());
        assertEquals("c:\\app\\jenkins\\workspace\\foo\\bar\\manchu", new FilePath(winPath, "foo\\bar/manchu").getRemote());
        assertEquals("c:\\app\\jenkins\\workspace\\foo\\bar\\manchu", new FilePath(winPath, "foo\\bar\\manchu").getRemote());
        assertEquals("/opt/jenkins/workspace/foo/bar/manchu", new FilePath(nixPath, "foo\\bar\\manchu").getRemote());
View Full Code Here

Examples of hudson.remoting.LocalChannel

        // unsupported platform, take a chance
        return newLocalChannel();
    }

    private static LocalChannel newLocalChannel() {
        return new LocalChannel(Computer.threadPoolForRemoting);
    }
View Full Code Here

Examples of hudson.remoting.LocalChannel

        // unsupported platform, take a chance
        return newLocalChannel();
    }

    private static LocalChannel newLocalChannel() {
        return new LocalChannel(Computer.threadPoolForRemoting);
    }
View Full Code Here

Examples of io.netty.channel.local.LocalChannel

    private final DefaultAttributeMap attributeMap = new DefaultAttributeMap();
    private final Channel channel;
    private final DefaultChannelPromise completedPromise;

    public NoOpChannelHandlerContext() {
        this(new LocalChannel());
    }
View Full Code Here

Examples of io.netty.channel.local.LocalChannel

    private final DefaultAttributeMap attributeMap = new DefaultAttributeMap();
    private final Channel channel;
    private final DefaultChannelPromise failedPromise;

    public NoOpChannelHandlerContext() {
        channel = new LocalChannel() {
            @Override
            public <T> Attribute<T> attr(AttributeKey<T> key) {
                return attributeMap.attr(key);
            }
        };
View Full Code Here

Examples of io.netty.channel.local.LocalChannel

    private final ChannelDuplexHandler handler;
    private final UnpooledByteBufAllocator bufAllocator = new UnpooledByteBufAllocator(true);
    private final AttributeMap attributeMap = new DefaultAttributeMap();

    public MockChannelHandlerContext(String name) {
        this(new LocalChannel(), name, null);
    }
View Full Code Here

Examples of io.netty.channel.local.LocalChannel

public class TransportResponseHandlerSuite {
  @Test
  public void handleSuccessfulFetch() {
    StreamChunkId streamChunkId = new StreamChunkId(1, 0);

    TransportResponseHandler handler = new TransportResponseHandler(new LocalChannel());
    ChunkReceivedCallback callback = mock(ChunkReceivedCallback.class);
    handler.addFetchRequest(streamChunkId, callback);
    assertEquals(1, handler.numOutstandingRequests());

    handler.handle(new ChunkFetchSuccess(streamChunkId, new TestManagedBuffer(123)));
View Full Code Here

Examples of io.netty.channel.local.LocalChannel

  }

  @Test
  public void handleFailedFetch() {
    StreamChunkId streamChunkId = new StreamChunkId(1, 0);
    TransportResponseHandler handler = new TransportResponseHandler(new LocalChannel());
    ChunkReceivedCallback callback = mock(ChunkReceivedCallback.class);
    handler.addFetchRequest(streamChunkId, callback);
    assertEquals(1, handler.numOutstandingRequests());

    handler.handle(new ChunkFetchFailure(streamChunkId, "some error msg"));
View Full Code Here

Examples of io.netty.channel.local.LocalChannel

    assertEquals(0, handler.numOutstandingRequests());
  }

  @Test
  public void clearAllOutstandingRequests() {
    TransportResponseHandler handler = new TransportResponseHandler(new LocalChannel());
    ChunkReceivedCallback callback = mock(ChunkReceivedCallback.class);
    handler.addFetchRequest(new StreamChunkId(1, 0), callback);
    handler.addFetchRequest(new StreamChunkId(1, 1), callback);
    handler.addFetchRequest(new StreamChunkId(1, 2), callback);
    assertEquals(3, handler.numOutstandingRequests());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.