You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Henri Yandell <fl...@gmail.com> on 2006/03/10 02:10:58 UTC

Cactus tests via Maven

When I run the Cactus tests through Maven against Tomcat 4.1.31, I get
three failed tests in the MultipartBoundaryInputStreamTest. I'm on the
1.2.X branch.

I presume that people mostly do it with Ant, so will dig into getting
that setup, but thought I'd report the problem.

Hen

Errors follow:

    [cactus]    FAILED
    [cactus] Actual bytes don't match the desired bytes
    [cactus] junit.framework.AssertionFailedError: Actual bytes don't
match the desired bytes
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.assertEquals(MultipartBoundaryInputStreamTest.java:661)
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.testProblemFile2(MultipartBoundaryInputStreamTest.java:528)
    [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [cactus]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [cactus]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [cactus]
    [cactus] Testcase: testProblemFile2Testcase: testProblemFile3 took 0.007 sec
    [cactus]    FAILED
    [cactus] Actual bytes don't match the desired bytes
    [cactus] junit.framework.AssertionFailedError: Actual bytes don't
match the desired bytes
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.assertEquals(MultipartBoundaryInputStreamTest.java:661)
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.testProblemFile3(MultipartBoundaryInputStreamTest.java:591)
    [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [cactus]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [cactus]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [cactus]
    [cactus] Testcase: testProblemFile3Testcase: testMaxLengthExceeded
took 0.005 sec
    [cactus]    FAILED
    [cactus] null
    [cactus] junit.framework.AssertionFailedError
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.testMaxLengthExceeded(MultipartBoundaryInputStreamTest.java:650)
    [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [cactus]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [cactus]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [cactus]
    [cactus] Testcase: testMaxLengthExceeded
    [cactus] [ERROR] TEST
org.apache.struts.upload.MultipartBoundaryInputStreamTest FAILED

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


Re: Cactus tests via Maven

Posted by Henri Yandell <fl...@gmail.com>.
On 3/9/06, Niall Pemberton <ni...@blueyonder.co.uk> wrote:
> I'm not sure that the maven build has ever been sorted out to work properly
> in the 1.2.x branch and for 1.2.x and before ant is the official build
> process. Its only since 1.3.x that we adopted maven and got it to work
> properly. I ran the tests today and they all passed, but I will check if
> this test is being run by ant.
>
> Getting the ant build to work for 1.2.x is pretty straight forward if you
> use the "download-dependencies" option - means you don't have to configure
> loads of build.properties/jars. Theres a sample "build.properties" for use
> with the "download-dependencies" option - called
> "build.properties.sample.download".
>
> So for example to run the "dist" target, all you need to do is
>
> ant download-dependencies dist

Yeah, I've been doing this - it's very nice.

Just hadn't thought I could use it for the cactus side of things :)

Hen

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


Re: Cactus tests via Maven

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
I'm not sure that the maven build has ever been sorted out to work properly
in the 1.2.x branch and for 1.2.x and before ant is the official build
process. Its only since 1.3.x that we adopted maven and got it to work
properly. I ran the tests today and they all passed, but I will check if
this test is being run by ant.

Getting the ant build to work for 1.2.x is pretty straight forward if you
use the "download-dependencies" option - means you don't have to configure
loads of build.properties/jars. Theres a sample "build.properties" for use
with the "download-dependencies" option - called
"build.properties.sample.download".

So for example to run the "dist" target, all you need to do is

ant download-dependencies dist

Niall

----- Original Message ----- 
From: "Henri Yandell" <fl...@gmail.com>
Sent: Friday, March 10, 2006 1:10 AM


When I run the Cactus tests through Maven against Tomcat 4.1.31, I get
three failed tests in the MultipartBoundaryInputStreamTest. I'm on the
1.2.X branch.

I presume that people mostly do it with Ant, so will dig into getting
that setup, but thought I'd report the problem.

Hen

Errors follow:

    [cactus]    FAILED
    [cactus] Actual bytes don't match the desired bytes
    [cactus] junit.framework.AssertionFailedError: Actual bytes don't
match the desired bytes
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.assertEquals(Multi
partBoundaryInputStreamTest.java:661)
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.testProblemFile2(M
ultipartBoundaryInputStreamTest.java:528)
    [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    [cactus]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    [cactus]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    [cactus]
    [cactus] Testcase: testProblemFile2Testcase: testProblemFile3 took 0.007
sec
    [cactus]    FAILED
    [cactus] Actual bytes don't match the desired bytes
    [cactus] junit.framework.AssertionFailedError: Actual bytes don't
match the desired bytes
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.assertEquals(Multi
partBoundaryInputStreamTest.java:661)
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.testProblemFile3(M
ultipartBoundaryInputStreamTest.java:591)
    [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    [cactus]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    [cactus]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    [cactus]
    [cactus] Testcase: testProblemFile3Testcase: testMaxLengthExceeded
took 0.005 sec
    [cactus]    FAILED
    [cactus] null
    [cactus] junit.framework.AssertionFailedError
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.testMaxLengthExcee
ded(MultipartBoundaryInputStreamTest.java:650)
    [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    [cactus]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    [cactus]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    [cactus]
    [cactus] Testcase: testMaxLengthExceeded
    [cactus] [ERROR] TEST
org.apache.struts.upload.MultipartBoundaryInputStreamTest FAILED

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





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


Re: Cactus tests via Maven

Posted by Martin Cooper <ma...@apache.org>.
On 3/9/06, Niall Pemberton <ni...@blueyonder.co.uk> wrote:
>
> OK, looks like MultipartBoundaryInputStreamTest isn't being run and I
> can't
> find any evidence of it ever having been run - even in Struts 1.1 when
> that
> test was added. The class its testing (MultipartBoundaryInputStream) has
> been deprecated in favour of Commons Fileupload (and removed in Struts 1.3
> ).
> Sorry don't know the history behind it - one thing is that it seems
> incorrect for cactus to be trying to run that test - looks like a normal
> JUnit test case to me (and I can't even work out how cactus is kicked off
> by
> maven anyway).


Wow, that's ancient history. ;-) It's part of the original multipart handler
that never really worked very well, and was broken enough that I gave up on
trying to fix all the bugs and wrote the one that sits on top of Commons
FileUpload instead. I don't remember for sure - it's been too long - but I
suspect the tests never worked properly, since the implementation didn't
either.

It sounds like this test isn't being run when using Ant, but is with Maven.
If it's causing problems for Maven users (and the build otherwise works), I
think we should probably just zap the test class. Nobody should be using the
old multipart handler anyway, so there's no point in testing it.

--
Martin Cooper


Niall
>
> ----- Original Message -----
> From: "Henri Yandell" <fl...@gmail.com>
> Sent: Friday, March 10, 2006 1:10 AM
>
>
> When I run the Cactus tests through Maven against Tomcat 4.1.31, I get
> three failed tests in the MultipartBoundaryInputStreamTest. I'm on the
> 1.2.X branch.
>
> I presume that people mostly do it with Ant, so will dig into getting
> that setup, but thought I'd report the problem.
>
> Hen
>
> Errors follow:
>
>     [cactus]    FAILED
>     [cactus] Actual bytes don't match the desired bytes
>     [cactus] junit.framework.AssertionFailedError: Actual bytes don't
> match the desired bytes
>     [cactus]    at
> org.apache.struts.upload.MultipartBoundaryInputStreamTest.assertEquals
> (Multi
> partBoundaryInputStreamTest.java:661)
>     [cactus]    at
> org.apache.struts.upload.MultipartBoundaryInputStreamTest.testProblemFile2
> (M
> ultipartBoundaryInputStreamTest.java:528)
>     [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>     [cactus]    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39
> )
>     [cactus]    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl
> .java:25)
>     [cactus]
>     [cactus] Testcase: testProblemFile2Testcase: testProblemFile3 took
> 0.007
> sec
>     [cactus]    FAILED
>     [cactus] Actual bytes don't match the desired bytes
>     [cactus] junit.framework.AssertionFailedError: Actual bytes don't
> match the desired bytes
>     [cactus]    at
> org.apache.struts.upload.MultipartBoundaryInputStreamTest.assertEquals
> (Multi
> partBoundaryInputStreamTest.java:661)
>     [cactus]    at
> org.apache.struts.upload.MultipartBoundaryInputStreamTest.testProblemFile3
> (M
> ultipartBoundaryInputStreamTest.java:591)
>     [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>     [cactus]    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39
> )
>     [cactus]    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl
> .java:25)
>     [cactus]
>     [cactus] Testcase: testProblemFile3Testcase: testMaxLengthExceeded
> took 0.005 sec
>     [cactus]    FAILED
>     [cactus] null
>     [cactus] junit.framework.AssertionFailedError
>     [cactus]    at
>
> org.apache.struts.upload.MultipartBoundaryInputStreamTest.testMaxLengthExcee
> ded(MultipartBoundaryInputStreamTest.java:650)
>     [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>     [cactus]    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39
> )
>     [cactus]    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl
> .java:25)
>     [cactus]
>     [cactus] Testcase: testMaxLengthExceeded
>     [cactus] [ERROR] TEST
> org.apache.struts.upload.MultipartBoundaryInputStreamTest FAILED
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: Cactus tests via Maven

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
OK, looks like MultipartBoundaryInputStreamTest isn't being run and I can't
find any evidence of it ever having been run - even in Struts 1.1 when that
test was added. The class its testing (MultipartBoundaryInputStream) has
been deprecated in favour of Commons Fileupload (and removed in Struts 1.3).
Sorry don't know the history behind it - one thing is that it seems
incorrect for cactus to be trying to run that test - looks like a normal
JUnit test case to me (and I can't even work out how cactus is kicked off by
maven anyway).

Niall

----- Original Message ----- 
From: "Henri Yandell" <fl...@gmail.com>
Sent: Friday, March 10, 2006 1:10 AM


When I run the Cactus tests through Maven against Tomcat 4.1.31, I get
three failed tests in the MultipartBoundaryInputStreamTest. I'm on the
1.2.X branch.

I presume that people mostly do it with Ant, so will dig into getting
that setup, but thought I'd report the problem.

Hen

Errors follow:

    [cactus]    FAILED
    [cactus] Actual bytes don't match the desired bytes
    [cactus] junit.framework.AssertionFailedError: Actual bytes don't
match the desired bytes
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.assertEquals(Multi
partBoundaryInputStreamTest.java:661)
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.testProblemFile2(M
ultipartBoundaryInputStreamTest.java:528)
    [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    [cactus]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    [cactus]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    [cactus]
    [cactus] Testcase: testProblemFile2Testcase: testProblemFile3 took 0.007
sec
    [cactus]    FAILED
    [cactus] Actual bytes don't match the desired bytes
    [cactus] junit.framework.AssertionFailedError: Actual bytes don't
match the desired bytes
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.assertEquals(Multi
partBoundaryInputStreamTest.java:661)
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.testProblemFile3(M
ultipartBoundaryInputStreamTest.java:591)
    [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    [cactus]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    [cactus]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    [cactus]
    [cactus] Testcase: testProblemFile3Testcase: testMaxLengthExceeded
took 0.005 sec
    [cactus]    FAILED
    [cactus] null
    [cactus] junit.framework.AssertionFailedError
    [cactus]    at
org.apache.struts.upload.MultipartBoundaryInputStreamTest.testMaxLengthExcee
ded(MultipartBoundaryInputStreamTest.java:650)
    [cactus]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    [cactus]    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    [cactus]    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    [cactus]
    [cactus] Testcase: testMaxLengthExceeded
    [cactus] [ERROR] TEST
org.apache.struts.upload.MultipartBoundaryInputStreamTest FAILED



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