This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to branch master-1.x in repository wagon.
commit 5b4016d92ff221abaa5f7438738ca9030fbb8840 Author: Damien Raude-Morvan <draz...@debian.org> Date: Sun Aug 25 22:03:28 2013 +0000 * Team upload. * Fix FTBFS with latest switch to java7 (Closes: #717280): - d/patches/0004-fix-tests-parrallel-run.diff: Provide a different port each running test. - d/patches/0003-do-not-run-https-tests.patch: Skip HTTPS tests for now. --- debian/changelog | 12 + debian/libwagon-java.poms | 30 +- debian/maven.properties | 2 - ...sts.patch => 0003-do-not-run-https-tests.patch} | 28 +- debian/patches/0004-fix-tests-parrallel-run.diff | 399 +++++++++++++++++++++ debian/patches/series | 3 +- 6 files changed, 451 insertions(+), 23 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3af8bf4..2dea117 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +wagon (1.0.0-4) unstable; urgency=low + + [ Damien Raude-Morvan ] + * Team upload. + * Fix FTBFS with latest switch to java7 (Closes: #717280): + - d/patches/0004-fix-tests-parrallel-run.diff: Provide a different + port each running test. + - d/patches/0003-do-not-run-https-tests.patch: Skip HTTPS tests + for now. + + -- Damien Raude-Morvan <draz...@debian.org> Sun, 25 Aug 2013 23:22:18 +0200 + wagon (1.0.0-3) unstable; urgency=low * debian/watch: Updated to match only 1.x versions diff --git a/debian/libwagon-java.poms b/debian/libwagon-java.poms index 26f066b..22dd643 100644 --- a/debian/libwagon-java.poms +++ b/debian/libwagon-java.poms @@ -24,18 +24,18 @@ # temporarily for certain artifacts such as Javadoc jars. # pom.xml --no-parent --has-package-version -wagon-provider-api/pom.xml --has-package-version -wagon-providers/pom.xml --has-package-version -wagon-providers/wagon-file/pom.xml --has-package-version -wagon-providers/wagon-ftp/pom.xml --has-package-version -wagon-providers/wagon-http-lightweight/pom.xml --has-package-version -wagon-providers/wagon-http/pom.xml --has-package-version -wagon-providers/wagon-http-shared/pom.xml --has-package-version -wagon-providers/wagon-scm/pom.xml --has-package-version -wagon-providers/wagon-ssh-external/pom.xml --has-package-version -wagon-providers/wagon-ssh-common/pom.xml --has-package-version -wagon-providers/wagon-ssh-common-test/pom.xml --has-package-version -wagon-providers/wagon-ssh/pom.xml --has-package-version -wagon-provider-test/pom.xml --has-package-version -wagon-tcks/pom.xml --has-package-version -wagon-tcks/wagon-tck-http/pom.xml --has-package-version +wagon-provider-api/pom.xml --has-package-version --java-lib +wagon-providers/pom.xml --has-package-version --java-lib +wagon-providers/wagon-file/pom.xml --has-package-version --java-lib +wagon-providers/wagon-ftp/pom.xml --has-package-version --java-lib +wagon-providers/wagon-http-lightweight/pom.xml --has-package-version --java-lib +wagon-providers/wagon-http/pom.xml --has-package-version --java-lib +wagon-providers/wagon-http-shared/pom.xml --has-package-version --java-lib +wagon-providers/wagon-scm/pom.xml --has-package-version --java-lib +wagon-providers/wagon-ssh-external/pom.xml --has-package-version --java-lib +wagon-providers/wagon-ssh-common/pom.xml --has-package-version --java-lib +wagon-providers/wagon-ssh-common-test/pom.xml --has-package-version --java-lib +wagon-providers/wagon-ssh/pom.xml --has-package-version --java-lib +wagon-provider-test/pom.xml --has-package-version --java-lib +wagon-tcks/pom.xml --has-package-version --java-lib +wagon-tcks/wagon-tck-http/pom.xml --has-package-version --java-lib diff --git a/debian/maven.properties b/debian/maven.properties index 7c29bd7..a01cb2f 100644 --- a/debian/maven.properties +++ b/debian/maven.properties @@ -1,4 +1,2 @@ -# Include here properties to pass to Maven during the build. -# For example: # maven.test.skip=true diff --git a/debian/patches/0003-do-not-run-LightweightHttp-tests.patch b/debian/patches/0003-do-not-run-https-tests.patch similarity index 56% rename from debian/patches/0003-do-not-run-LightweightHttp-tests.patch rename to debian/patches/0003-do-not-run-https-tests.patch index 3211b5d..6c37f9c 100644 --- a/debian/patches/0003-do-not-run-LightweightHttp-tests.patch +++ b/debian/patches/0003-do-not-run-https-tests.patch @@ -6,11 +6,9 @@ Subject: [PATCH] do not run LightweightHttp* tests wagon-providers/wagon-http-lightweight/pom.xml | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) -diff --git a/wagon-providers/wagon-http-lightweight/pom.xml b/wagon-providers/wagon-http-lightweight/pom.xml -index 70ea885..d413f31 100644 --- a/wagon-providers/wagon-http-lightweight/pom.xml +++ b/wagon-providers/wagon-http-lightweight/pom.xml -@@ -50,4 +50,18 @@ under the License. +@@ -50,4 +50,18 @@ </exclusions> </dependency> </dependencies> @@ -22,11 +20,31 @@ index 70ea885..d413f31 100644 + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <excludes> -+ <exclude>**/LightweightHttp*</exclude> ++ <exclude>**/LightweightHttps*</exclude> ++ </excludes> ++ </configuration> ++ </plugin> ++ </plugins> ++ </build> + </project> +--- a/wagon-providers/wagon-http/pom.xml ++++ b/wagon-providers/wagon-http/pom.xml +@@ -84,4 +84,18 @@ + </plugins> + </build> + --> ++ ++ <build> ++ <plugins> ++ <plugin> ++ <groupId>org.apache.maven.plugins</groupId> ++ <artifactId>maven-surefire-plugin</artifactId> ++ <configuration> ++ <excludes> ++ <exclude>**/Https*</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> </project> --- diff --git a/debian/patches/0004-fix-tests-parrallel-run.diff b/debian/patches/0004-fix-tests-parrallel-run.diff new file mode 100644 index 0000000..1b752af --- /dev/null +++ b/debian/patches/0004-fix-tests-parrallel-run.diff @@ -0,0 +1,399 @@ +Description: Tests fail with 'Address already in use' when building Wagon in parallel mode + WAGON-335 use different ports for the test server fixtures for each wagon module + . + This prevents us from getting 'Address already in use' Exceptions when building + wagon in parallel mode +Author: Damien Raude-Morvan <draz...@debian.org> +Last-Update: 2013-08-25 +Bug: http://jira.codehaus.org/browse/WAGON-335 +Bug-Debian: http://bugs.debian.org/717280 +--- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java ++++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java +@@ -132,6 +132,13 @@ + */ + protected abstract String getProtocol(); + ++ /** ++ * The number of the port which should get used to start the test server ++ * ++ * @return the port number for the test server ++ */ ++ protected abstract int getTestRepositoryPort(); ++ + // ---------------------------------------------------------------------- + // 1. Create a local file repository which mimic a users local file + // Repository. +--- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java ++++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java +@@ -88,7 +88,7 @@ + FileUtils.deleteDirectory( repositoryDirectory ); + repositoryDirectory.mkdirs(); + +- server = new Server( 10007 ); ++ server = new Server( getTestRepositoryPort() ); + + PutHandler putHandler = new PutHandler( repositoryDirectory ); + server.addHandler( putHandler ); +@@ -318,7 +318,7 @@ + public void testGzipGet() + throws Exception + { +- Server server = new Server( 10008 ); ++ Server server = new Server( getTestRepositoryPort() ); + + String localRepositoryPath = FileTestUtils.getTestOutputDir().toString(); + Context root = new Context( server, "/", Context.SESSIONS ); +@@ -388,12 +388,12 @@ + throws Exception, IOException, ConnectionException, AuthenticationException, ResourceDoesNotExistException, + TransferFailedException, AuthorizationException + { +- Server proxyServer = new Server( 10007 ); ++ Server proxyServer = new Server( getTestRepositoryPort() ); + + proxyServer.setHandler( handler ); + proxyServer.start(); + +- proxyInfo.setPort( 10007 ); ++ proxyInfo.setPort( getTestRepositoryPort() ); + + try + { +--- a/wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java ++++ b/wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java +@@ -49,6 +49,11 @@ + + return "file://" + file.getPath(); + } ++ ++ protected int getTestRepositoryPort() { ++ // file transfer dont needs a port ++ return 0; ++ } + + /** + * This test is introduced to allow for null file wagons. +--- a/wagon-providers/wagon-ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.java ++++ b/wagon-providers/wagon-ftp/src/test/java/org/apache/maven/wagon/providers/ftp/FtpWagonTest.java +@@ -45,6 +45,10 @@ + return "ftp"; + } + ++ protected int getTestRepositoryPort() { ++ return 10023; ++ } ++ + protected void setupWagonTestingFixtures() + throws Exception + { +@@ -67,7 +71,7 @@ + + protected String getTestRepositoryUrl() + { +- return "ftp://localhost:10023"; ++ return "ftp://localhost:" + getTestRepositoryPort(); + } + + public AuthenticationInfo getAuthInfo() +--- a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java ++++ b/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java +@@ -41,7 +41,11 @@ + + protected String getTestRepositoryUrl() + { +- return getProtocol() + "://localhost:10007/"; ++ return getProtocol() + "://localhost:" + getTestRepositoryPort() + "/"; ++ } ++ ++ protected int getTestRepositoryPort() { ++ return 10017; + } + + protected void setHttpHeaders( StreamingWagon wagon, Properties properties ) +--- a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpsWagonTest.java ++++ b/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpsWagonTest.java +@@ -34,13 +34,17 @@ + return "https"; + } + ++ protected int getTestRepositoryPort() { ++ return super.getTestRepositoryPort() + 443; ++ } ++ + protected void addConnectors( Server server ) + { + System.setProperty( "javax.net.ssl.trustStore", + getTestFile( "src/test/resources/ssl/keystore" ).getAbsolutePath() ); + + SslSocketConnector connector = new SslSocketConnector(); +- connector.setPort( server.getConnectors()[0].getPort() ); ++ connector.setPort( getTestRepositoryPort() ); + connector.setKeystore( getTestPath( "src/test/resources/ssl/keystore" ) ); + connector.setPassword( "wagonhttp" ); + connector.setKeyPassword( "wagonhttp" ); +--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java ++++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java +@@ -38,7 +38,11 @@ + + protected String getTestRepositoryUrl() + { +- return getProtocol() + "://localhost:10007"; ++ return getProtocol() + "://localhost:" + getTestRepositoryPort(); ++ } ++ ++ protected int getTestRepositoryPort() { ++ return 10009; + } + + protected void setHttpHeaders( StreamingWagon wagon, Properties properties ) +--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpsWagonTest.java ++++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpsWagonTest.java +@@ -31,13 +31,17 @@ + return "https"; + } + ++ protected int getTestRepositoryPort() { ++ return super.getTestRepositoryPort() + 443; ++ } ++ + protected void addConnectors( Server server ) + { + System.setProperty( "javax.net.ssl.trustStore", + getTestFile( "src/test/resources/ssl/keystore" ).getAbsolutePath() ); + + SslSocketConnector connector = new SslSocketConnector(); +- connector.setPort( server.getConnectors()[0].getPort() ); ++ connector.setPort( getTestRepositoryPort() ); + connector.setKeystore( getTestPath( "src/test/resources/ssl/keystore" ) ); + connector.setPassword( "wagonhttp" ); + connector.setKeyPassword( "wagonhttp" ); +--- a/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/AbstractScmWagonTest.java ++++ b/wagon-providers/wagon-scm/src/test/java/org/apache/maven/wagon/providers/scm/AbstractScmWagonTest.java +@@ -78,6 +78,10 @@ + } + } + ++ protected int getTestRepositoryPort() { ++ return 0; // not used ++ } ++ + /** + * Allows overriding the {@link ScmProvider} injected by default in the {@link ScmWagon}. + * Useful to force the implementation to use for a particular SCM type. +--- a/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagonTest.java ++++ b/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpExternalWagonTest.java +@@ -55,6 +55,10 @@ + return "scpexe"; + } + ++ protected int getTestRepositoryPort() { ++ return 0; // not used ++ } ++ + public String getTestRepositoryUrl() + { + return TestData.getTestRepositoryUrl(); +--- a/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpWagonWithSshPrivateKeySearchTest.java ++++ b/wagon-providers/wagon-ssh-external/src/test/java/org/apache/maven/wagon/providers/ssh/external/ScpWagonWithSshPrivateKeySearchTest.java +@@ -53,6 +53,10 @@ + return "scpexe"; + } + ++ protected int getTestRepositoryPort() { ++ return 0; // not used ++ } ++ + public String getTestRepositoryUrl() + { + return TestData.getTestRepositoryUrl(); +--- a/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonTest.java ++++ b/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonTest.java +@@ -39,6 +39,10 @@ + return "scp"; + } + ++ protected int getTestRepositoryPort() { ++ return 0; // not used ++ } ++ + public String getTestRepositoryUrl() + { + return TestData.getTestRepositoryUrl(); +--- a/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonWithSshPrivateKeySearchTest.java ++++ b/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/ScpWagonWithSshPrivateKeySearchTest.java +@@ -42,6 +42,10 @@ + return "scp"; + } + ++ protected int getTestRepositoryPort() { ++ return 0; // not used ++ } ++ + public String getTestRepositoryUrl() + { + return TestData.getTestRepositoryUrl(); +--- a/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagonTest.java ++++ b/wagon-providers/wagon-ssh/src/test/java/org/apache/maven/wagon/providers/ssh/jsch/SftpWagonTest.java +@@ -39,6 +39,10 @@ + return "sftp"; + } + ++ protected int getTestRepositoryPort() { ++ return 0; // not used ++ } ++ + public String getTestRepositoryUrl() + { + return TestData.getTestRepositoryUrl(); +--- a/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java ++++ b/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java +@@ -45,7 +45,7 @@ + protected String getTestRepositoryUrl() + throws IOException + { +- return getProtocol() + "://localhost:10007/newfolder/folder2"; ++ return getProtocol() + "://localhost:" + getTestRepositoryPort() + "/newfolder/folder2"; + } + + protected String getProtocol() +@@ -87,7 +87,7 @@ + */ + public void testGetURLDavHttp() + { +- assertURL( "dav:http://localhost:10007/dav/", "http://localhost:10007/dav/" ); ++ assertURL( "dav:http://localhost:" + getTestRepositoryPort() + "/dav/", "http://localhost:" + getTestRepositoryPort() + "/dav/" ); + } + + /** +@@ -95,7 +95,7 @@ + */ + public void testGetURLDavHttps() + { +- assertURL( "dav:https://localhost:10007/dav/", "https://localhost:10007/dav/" ); ++ assertURL( "dav:https://localhost:" + getTestRepositoryPort() + "/dav/", "https://localhost:" + getTestRepositoryPort() + "/dav/" ); + } + + /** +@@ -103,7 +103,7 @@ + */ + public void testGetURLDavUri() + { +- assertURL( "dav://localhost:10007/dav/", "http://localhost:10007/dav/" ); ++ assertURL( "dav://localhost:" + getTestRepositoryPort() + "/dav/", "http://localhost:" + getTestRepositoryPort() +"/dav/" ); + } + + /** +@@ -111,7 +111,7 @@ + */ + public void testGetURLDavUriWithSsl() + { +- assertURL( "davs://localhost:10007/dav/", "https://localhost:10007/dav/" ); ++ assertURL( "davs://localhost:" + getTestRepositoryPort() +"/dav/", "https://localhost:" + getTestRepositoryPort() +"/dav/" ); + } + + /** +@@ -119,7 +119,7 @@ + */ + public void testGetURLDavPlusHttp() + { +- assertURL( "dav+https://localhost:10007/dav/", "https://localhost:10007/dav/" ); ++ assertURL( "dav+https://localhost:" + getTestRepositoryPort() + "/dav/", "https://localhost:" + getTestRepositoryPort() + "/dav/" ); + } + + /** +@@ -127,7 +127,7 @@ + */ + public void testGetURLDavPlusHttps() + { +- assertURL( "dav+https://localhost:10007/dav/", "https://localhost:10007/dav/" ); ++ assertURL( "dav+https://localhost:" + getTestRepositoryPort() + "/dav/", "https://localhost:" + getTestRepositoryPort() + "/dav/" ); + } + + public void testMkdirs() throws Exception +--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpWagonTests.java ++++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpWagonTests.java +@@ -48,6 +48,8 @@ + + private ServerFixture serverFixture; + ++ private static int defaultPort = 9080; ++ + private static PlexusContainer container; + + private Wagon wagon; +@@ -282,7 +284,12 @@ + + protected int getDefaultPort() + { +- return 9080; ++ return defaultPort; ++ } ++ ++ public static void setDefaultPort( int defaultPort ) ++ { ++ HttpWagonTests.defaultPort = defaultPort; + } + + protected int getPortPropertyValue() +--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpsGetWagonTests.java ++++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/HttpsGetWagonTests.java +@@ -32,7 +32,7 @@ + @Override + protected int getDefaultPort() + { +- return 9443; ++ return super.getDefaultPort() + 443; + } + + } +--- /dev/null ++++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/TckTest.java +@@ -0,0 +1,49 @@ ++package org.apache.maven.wagon.tck.http; ++ ++/* ++ * Licensed to the Apache Software Foundation (ASF) under one ++ * or more contributor license agreements. See the NOTICE file ++ * distributed with this work for additional information ++ * regarding copyright ownership. The ASF licenses this file ++ * to you under the Apache License, Version 2.0 (the ++ * "License"); you may not use this file except in compliance ++ * with the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, ++ * software distributed under the License is distributed on an ++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ++ * KIND, either express or implied. See the License for the ++ * specific language governing permissions and limitations ++ * under the License. ++ */ ++ ++import org.junit.BeforeClass; ++import org.junit.runner.RunWith; ++import org.junit.runners.Suite; ++ ++/** ++ * This test will run the TCK suite on wagon-http-lightweight ++ */ ++@RunWith( Suite.class ) ++@Suite.SuiteClasses( { GetWagonTests.class, HttpsGetWagonTests.class } ) ++public class TckTest ++{ ++ ++ @BeforeClass ++ public static void beforeAll() throws Exception ++ { ++ HttpWagonTests.setDefaultPort(9083); ++ } ++ ++ //public static Test suite() ++ //{ ++ // HttpWagonTests.setDefaultPort(9083); ++ // ++ // TestSuite mySuite = new TestSuite("org.apache.maven.wagon.tck.http"); ++ // mySuite.addTest(GetWagonTests.class); ++ // mySuite.addTest(HttpsGetWagonTests.class); ++ // return mySuite; ++ //} ++} diff --git a/debian/patches/series b/debian/patches/series index a29b590..5d3feec 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 0001-do-not-build-FtpWagonTest.java.patch 0002-disable-webdav-jackrabbit-module.patch -0003-do-not-run-LightweightHttp-tests.patch +0003-do-not-run-https-tests.patch +0004-fix-tests-parrallel-run.diff -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/wagon.git _______________________________________________ pkg-java-commits mailing list pkg-java-comm...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits