add some debug to understand why it fails with 1.5 on jenkins

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177622 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-09-30 12:25:32 +00:00
parent 0aaf3a2769
commit 7d285b2179
1 changed files with 18 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import org.apache.archiva.rest.api.services.ProxyConnectorService;
import org.apache.archiva.rest.api.services.RemoteRepositoriesService;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.apache.archiva.webdav.RepositoryServlet;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.cxf.common.util.Base64Utility;
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
@ -60,6 +61,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
@ -230,12 +234,25 @@ public class DownloadArtifactsTest
IOUtil.copy( is, fw );
// assert jar contains org/junit/runners/JUnit4.class
ZipFile zipFile = new ZipFile( file );
List<String> entries = getZipEntriesNames( zipFile );
ZipEntry zipEntry = zipFile.getEntry( "org/junit/runners/JUnit4.class" );
assertNotNull( zipEntry );
assertNotNull( "cannot find zipEntry org/junit/runners/JUnit4.class, entries: " + entries + ", content is: "
+ FileUtils.readFileToString( file ), zipEntry );
zipFile.close();
file.deleteOnExit();
}
private List<String> getZipEntriesNames( ZipFile zipFile )
{
List<String> entriesNames = new ArrayList<String>();
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while ( entries.hasMoreElements() )
{
entriesNames.add( entries.nextElement().getName() );
}
return entriesNames;
}
public static class RedirectServlet
extends HttpServlet
{