mbfishman / java-twitter

Automatically exported from code.google.com/p/java-twitter
Apache License 2.0
0 stars 0 forks source link

maven package failes with 2 not working tests #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. check out from svn
2. mvn package

What is the expected output? What do you see instead?

A working copy of the .jar-File

What version of the product are you using? On what operating system?

SVN-Trunk, Mac OS

Please provide any additional information below.

This was the surefire result:

-------------------------------------------------------------------------------
Test set: net.unto.twitter.StatusTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.083 sec
<<< FAILURE!
initializationError0(net.unto.twitter.StatusTest)  Time elapsed: 0.001 sec
 <<< ERROR!
java.lang.Exception: No runnable methods
    at
org.junit.internal.runners.MethodValidator.validateInstanceMethods(MethodValidat
or.java:32)
    at
org.junit.internal.runners.MethodValidator.validateMethodsForDefaultRunner(Metho
dValidator.java:43)
    at
org.junit.internal.runners.JUnit4ClassRunner.validate(JUnit4ClassRunner.java:36)
    at
org.junit.internal.runners.JUnit4ClassRunner.<init>(JUnit4ClassRunner.java:27)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorI
mpl.java:39)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorA
ccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.junit.internal.requests.ClassRequest.buildRunner(ClassRequest.java:33)
    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
    at
org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45)
    at
org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4Di
rectoryTestSuite.java:56)
    at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(Abstra
ctDirectoryTestSuite.java:96)
    at
org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:156)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBoote
r.java:334)
    at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980)

-------------------------------------------------------------------------------
Test set: net.unto.twitter.UserTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.023 sec
<<< FAILURE!
initializationError0(net.unto.twitter.UserTest)  Time elapsed: 0.003 sec 
<<< ERROR!
java.lang.Exception: No runnable methods
    at
org.junit.internal.runners.MethodValidator.validateInstanceMethods(MethodValidat
or.java:32)
    at
org.junit.internal.runners.MethodValidator.validateMethodsForDefaultRunner(Metho
dValidator.java:43)
    at
org.junit.internal.runners.JUnit4ClassRunner.validate(JUnit4ClassRunner.java:36)
    at
org.junit.internal.runners.JUnit4ClassRunner.<init>(JUnit4ClassRunner.java:27)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorI
mpl.java:39)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorA
ccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.junit.internal.requests.ClassRequest.buildRunner(ClassRequest.java:33)
    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28)
    at
org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45)
    at
org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4Di
rectoryTestSuite.java:56)
    at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(Abstra
ctDirectoryTestSuite.java:96)
    at
org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:156)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBoote
r.java:334)
    at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980)

Original issue reported on code.google.com by bodo.tas...@gmail.com on 13 Oct 2008 at 7:29

GoogleCodeExporter commented 9 years ago
Known bug.  There are no tests in those classes.  The new branch will fix this. 
 Thanks!

Original comment by dclinton on 14 Oct 2008 at 12:45

GoogleCodeExporter commented 9 years ago
OK, so that was a few months ago. No new branch. Looks like our good friend 
DeWitt
has other things to attend to.

So, for those who'd rather not wait, attached in testfixes.zip are versions of
src/test/java/net/unto/twitter/StatusTest.java and UserTest.java that will not
generate test failures at build time. (I just uncommented out a simple Test in
UserTest.java and wrote one that worked in StatusTest.java)

Just unzip, drop into src/test/java/net/unto/twitter, and re-run mvn package.

-Steve

Original comment by sbarb...@gmail.com on 9 Mar 2009 at 2:46

Attachments:

GoogleCodeExporter commented 9 years ago
(Ah, I spoke too soon.) My patch above is righteous, but looks like Mr. Clinton 
has
been hard at work this weekend on v2! All right!

Original comment by sbarb...@gmail.com on 9 Mar 2009 at 2:52