FTBFS: tests require internet connectivity

Bug #1217909 reported by Andreas Moog
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
checkstyle (Debian)
Fix Released
Unknown
checkstyle (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Imported from Debian bug http://bugs.debian.org/714109:

Package: checkstyle
Version: 5.6-1
Severity: serious
Justification: fails to build from source

This package requires internet connectivity for its test suite
to pass. Package builds must not not rely on external network
connectivity, but should be self-contained.

Build log:

[...]
Running com.puppycrawl.tools.checkstyle.checks.imports.PkgControlRegExpTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec

Results :

Tests in error:
  testLoadFromURL(com.puppycrawl.tools.checkstyle.filters.SuppressionsLoaderTest): unable to read http://checkstyle.hg.sourceforge.net/hgweb/checkstyle/checkstyle/raw-file/055e288619a5/src/testinputs/com/puppycrawl/tools/checkstyle/suppressions_none.xml

Tests run: 701, Failures: 0, Errors: 1, Skipped: 1

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to /tmp/buildd/checkstyle-5.6/target/surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Tue Jun 25 20:20:25 UTC 2013
[INFO] Final Memory: 29M/370M
[INFO] ------------------------------------------------------------------------
make: *** [mvn-build] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2

target/surefire-reports/com.puppycrawl.tools.checkstyle.filters.SuppressionsLoaderTest.txt:

-------------------------------------------------------------------------------
Test set: com.puppycrawl.tools.checkstyle.filters.SuppressionsLoaderTest
-------------------------------------------------------------------------------
Tests run: 9, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.049 sec <<< FAILURE!
testLoadFromURL(com.puppycrawl.tools.checkstyle.filters.SuppressionsLoaderTest) Time elapsed: 0.025 sec <<< ERROR!
com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to read http://checkstyle.hg.sourceforge.net/hgweb/checkstyle/checkstyle/raw-file/055e288619a5/src/testinputs/com/puppycrawl/tools/checkstyle/suppressions_none.xml
        at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader.loadSuppressions(SuppressionsLoader.java:152)
        at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoaderTest.testLoadFromURL(SuppressionsLoaderTest.java:61)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
        at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
        at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
Caused by: java.net.UnknownHostException: checkstyle.hg.sourceforge.net
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
        at sun.net.www.http.HttpClient.New(HttpClient.java:321)
        at sun.net.www.http.HttpClient.New(HttpClient.java:338)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
        at java.net.URL.openStream(URL.java:1031)
        at com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader.loadSuppressions(SuppressionsLoader.java:145)
        ... 30 more

Andreas Moog (ampelbein)
Changed in checkstyle (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Andreas Moog (amoog)
Changed in checkstyle (Debian):
importance: Undecided → Unknown
Revision history for this message
Andreas Moog (ampelbein) wrote :

I have attached a possible fix to the Debian report, doesn't hurt to let the Debian Java Team have a look and just sync this package once it's fixed there.

Changed in checkstyle (Ubuntu):
status: In Progress → Triaged
assignee: Andreas Moog (amoog) → nobody
Changed in checkstyle (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package checkstyle - 5.6-2

---------------
checkstyle (5.6-2) unstable; urgency=low

  * Disabled tests that require internet access, which may not be
    available on the build machines. Thanks to Andreas Moog.
    (Closes: #714109, LP: #1217909)

 -- Emmanuel Bourg <email address hidden> Wed, 28 Aug 2013 18:26:59 +0200

Changed in checkstyle (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.