14631464146514661467146814691470147114721473
StreamingWagon wagon = (StreamingWagon) getWagon(); Repository testRepository = new Repository( "id", getRepositoryUrl( server ) ); if ( addSecurityHandler ) { wagon.connect( testRepository, authInfo ); } else { wagon.connect( testRepository ); }
14671468146914701471147214731474147514761477
{ wagon.connect( testRepository, authInfo ); } else { wagon.connect( testRepository ); } try { for ( int i = 0; i < putNumber; i++ ) {
157158159160161162163164165166167
TestHeaderHandler handler = new TestHeaderHandler(); server.setHandler( handler ); addConnectors( server ); server.start(); wagon.connect( new Repository( "id", getProtocol() + "://localhost:" + server.getConnectors()[0].getLocalPort() ) ); wagon.getToStream( "resource", new StringOutputStream() ); wagon.disconnect();
189190191192193194195196197198199
267268269270271272273274275276277
handler.setStatusToReturn( status ); server.setHandler( handler ); addConnectors( server ); server.start(); wagon.connect( new Repository( "id", getRepositoryUrl( server ) ) ); try { wagon.getToStream( "resource", new StringOutputStream() ); fail();
335336337338339340341342343344345
handler.setStatusToReturn( status ); server.setHandler( handler ); addConnectors( server ); server.start(); wagon.connect( new Repository( "id", getRepositoryUrl( server ) ) ); try { return wagon.resourceExists( "resource" ); }
477478479480481482483484485486487
redirectServer.setHandler( redirectHandler ); redirectServer.start(); wagon.connect( new Repository( "id", getRepositoryUrl( redirectServer ) ) ); File tmpResult = File.createTempFile( "foo", "get" ); FileOutputStream fileOutputStream = new FileOutputStream( tmpResult );
158159160161162163164165166167168
TestHeaderHandler handler = new TestHeaderHandler(); server.setHandler( handler ); addConnectors( server ); server.start(); wagon.connect( new Repository( "id", getProtocol() + "://localhost:" + server.getConnectors()[0].getLocalPort() ) ); wagon.getToStream( "resource", new ByteArrayOutputStream() ); wagon.disconnect();
190191192193194195196197198199200
276277278279280281282283284285286
server.setHandler( handler ); addConnectors( server ); server.start(); wagon.connect( new Repository( "id", getRepositoryUrl( server ) ) ); try { wagon.getFileList( "resource" ); }