You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/10/04 23:23:54 UTC

DO NOT REPLY [Bug 40682] New: - Since 4-OCT the junit task fails for junit 4 and junit4.1

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682

           Summary: Since 4-OCT the junit task fails for junit 4 and
                    junit4.1
           Product: Ant
           Version: 1.7.0Beta2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: j_cumps@yahoo.com


Since this nights svn checkout (4-OCT-2006), junit 4-style tests fail.

    [junit] No runnable methods
    [junit] java.lang.Exception: No runnable methods

Tested from fresh svn build on Windows XP and Linux, both running java 1.5.0_06

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682





------- Additional Comments From j_cumps@yahoo.com  2006-10-05 07:55 -------
Created an attachment (id=18965)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18965&action=view)
example ant project exposing the bug

1. Extract the attached zipped project.
2. edit build.properties to reflect the location of junit4 jar file.

-------------------------------------------------------------------

clear junit4 from your classpath, remove junit 4 jar from ant/lib,
if applicable.

run the project
> ant all

=> Success

-------------------------------------------------------------------

put junit4 jar in classpath, or in ant/lib

run the project
> ant all

=> error

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From peterreilly@apache.org  2006-10-05 13:14 -------
I have committed a fix for this.
Thanks again for the report and help in tracking the problem.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682





------- Additional Comments From peterreilly@apache.org  2006-10-05 04:48 -------
It would be nice to have a test for this.
A small project with a simple test, and a small
build file.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682


j_cumps@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




------- Additional Comments From j_cumps@yahoo.com  2006-10-04 23:50 -------
Closing the issue, as I can't replicate it with a completely fresh checkout of 
the trunk.

I did a complete fresh checkout today of revision 453112.
Built it from scratch.
Pointed my ANT_HOME and PATH to it.
The issue does not re-occur.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682





------- Additional Comments From j_cumps@yahoo.com  2006-10-05 05:56 -------
Reply to Comment #5

Clean build ANT from svn...
Same behaviour as reported in Comment #4

junit task fails with junit4 jar in ./lib or CLASSPATH,
with or without junit4 jar in the classpath of ant's junit task.

junit task succeeds when 
- junit 4 jar is not in ./lib or CLASSPATH, *AND*
- the classpath in the junit task includes the junit4 jar

Reply to Comment #6
Working on that.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682


j_cumps@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Since 4-OCT the junit task  |Since 2006-09-29 the junit
                   |fails for junit 4 and       |task fails for junit 4 and
                   |junit4.1                    |junit4.1




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 4-OCT the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682





------- Additional Comments From j_cumps@yahoo.com  2006-10-04 15:23 -------
ok for --revision '{2006-09-20}'
ok for --revision '{2006-09-25}'
ok for --revision '{2006-09-26}'
ok for --revision '{2006-09-27}'
ok for --revision '{2006-09-28}' (revision 450591)

not ok for --revision '{2006-09-29}' (revision 451034)

So, the bug must be introducedin one of these files:

C:\sandbox_ant\ant>svn checkout --revision '{2006-09-29}' 
http://svn.apache.org/
repos/asf/ant/core/trunk/ ant-trunk
U    ant-trunk/src/tests/antunit/types/conditions/matches-test.xml
A    ant-trunk/src/tests/antunit/types/resources/tokens-test.xml
A    ant-trunk/src/tests/antunit/types/resources/utf-16.in
U    ant-trunk/src/tests/junit/org/apache/tools/ant/LocationTest.java
U    ant-
trunk/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest
.java
U    ant-trunk/src/main/org/apache/tools/ant/AntClassLoader.java
U    ant-trunk/src/main/org/apache/tools/ant/UnknownElement.java
U    ant-trunk/src/main/org/apache/tools/ant/filters/TokenFilter.java
U    ant-trunk/src/main/org/apache/tools/ant/RuntimeConfigurable.java
U    ant-
trunk/src/main/org/apache/tools/ant/taskdefs/condition/ConditionBase.ja
va
U    ant-trunk/src/main/org/apache/tools/ant/taskdefs/WaitFor.java
U    ant-trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java
U    ant-trunk/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java
U    ant-trunk/src/main/org/apache/tools/ant/types/defaults.properties
A    ant-trunk/src/main/org/apache/tools/ant/types/resources/Tokens.java
U    ant-trunk/src/main/org/apache/tools/ant/types/resources/URLResource.java
A    ant-trunk/src/main/org/apache/tools/ant/util/StringTokenizer.java
U    ant-trunk/src/main/org/apache/tools/ant/util/StringUtils.java
A    ant-trunk/src/main/org/apache/tools/ant/util/FileTokenizer.java
U    ant-trunk/src/main/org/apache/tools/ant/util/Tokenizer.java
U    ant-
trunk/src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java

U    ant-trunk/docs/manual/CoreTypes/resources.html
U    ant-trunk/CONTRIBUTORS
U    ant-trunk/contributors.xml
U    ant-trunk/WHATSNEW
Checked out revision 451034.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682





------- Additional Comments From j_cumps@yahoo.com  2006-10-05 01:23 -------
I have more background on this.

Before 2006-09-29, junit task worked with junit4 jar in ./lib or CLASSPATH
Since 2006-09-29, junit task fails with junit4 jar in ./lib or CLASSPATH, and 
succeeds when junit 4 jar is not in ./lib or CLASSPATH.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682


antoine@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |




------- Additional Comments From antoine@apache.org  2006-10-05 04:37 -------
Hello Jan,

>From what you wrote, it looks like this issue is a classloading issue.

Peter Reilly changed AntClassLoader.java again yesterday.

He had changed AntClassLoader.java on Wed Sep 27 22:46:57 2006 UTC, revision 450614.

Could you update again your SVN sandbox, I suspect this usecase will work again now.

Regards,

Antoine

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 4-OCT the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682





------- Additional Comments From j_cumps@yahoo.com  2006-10-04 15:07 -------
Checking when it started failing.
I've got a successful run with a checkout of  --revision '{2006-09-15}'
Now proceeding...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682





------- Additional Comments From peterreilly@apache.org  2006-10-05 09:24 -------
Thanks for the test case - it was a *big* help.
I have tracked down the problem.
The problem is due to
http://issues.apache.org/bugzilla/show_bug.cgi?id=40682
(Order of addX and addConfiguredX), the order
of setting attributes and elements was changed from

addX
setY
addConfiguredZ
execute()

to

setY
addX, addConfiguredZ (in order of the build file)
execute()

However junittask depends on the first order.
It is easy to fix JUnitTask for this, (I will
apply patch when I reach my svn machine), however
 1) I wonder if we need to rollback 40621
 2) why does junit only work for fork="yes" for junit4?



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 40682] - Since 2006-09-29 the junit task fails for junit 4 and junit4.1

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40682>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40682





------- Additional Comments From j_cumps@yahoo.com  2006-10-05 13:30 -------
Verified from fresh checkout...
It's fixed. Thank you.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org