You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2020/04/28 14:22:05 UTC

CTR: requesting review of org.apache.catalina.startup.TestMultipartConfig

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

I'd like a review of the test-case I wrote for the multipart config stuf
f.

It *works*, but perhaps there are better ways to do the things that I di
d.

Someone who is more familiar with all the various ways of testing
Tomcat would probably be able to replace some of my hacks with
something a little more straightforward.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl6oPA0ACgkQHPApP6U8
pFiFNg//fmJvxwcsm0YSiabo2lS3p/MTC80lW7ejvQhOUOdtYM6Nc/C8lSmbUK6x
BmSD1e7oXaH/GxQkFznGGi+n5FsSZd3hleRlQwxB6GKcQlAW5/IyCFnfFMPtXJH+
s5usaj/f52GIJb6ckf/RSMhL+QxC2jgMVSKuUlP7bi31NMxso6v8Q0p8V2FlCl8V
EPaLtH/vELBGHVa9Bc8KwlHqszhQpAs8mo/rejlm13fFitUEWdi4CR9Awo+0We0a
9l0WwyhGQH+NVAK5NZOTO4X6HtfrH9Bf77XcMiGBEB+3KUl5e35yulv4XmQHYKWX
miotPoC8K8yeuUuwZk3WanOLXOIQcutGLFiaomcQoVWKCybqbgwC3xfY72Uvcvkr
c01BOqwWs1QrgVVMLQi2UHNUWw3lM/0+IcPmiiYyAUA4AkeBZHUEGkP4L6dIU8XF
u1lcjgZe+yb0j+rEPzIq+kHnB0A/4M/a/VECIC3vtZV01gbgOnNwmwsuFplkdTcH
s2LJTy7VMyFEnyx8eAYbAjTvvVSuMieDMlsBqDauoLQkOqhr4cJ7ilT8LAA4c+BR
cvZKpqY6d8COky8hNjgj+ah8EqN3+nhcgHKHlJbcT0Thpe+8AnMHd21gRNBzetxs
dQ0/j0AHAOfcgptpUGL1NslgPR7f4jrRvQxKIlHXgKc56H6+p0w=
=7WVl
-----END PGP SIGNATURE-----

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


Re: CTR: requesting review of org.apache.catalina.startup.TestMultipartConfig

Posted by Mark Thomas <ma...@apache.org>.
On 29/04/2020 17:49, Christopher Schultz wrote:
> Mark,
> 
> On 4/28/20 14:03, Mark Thomas wrote:
>> On 28/04/2020 15:22, Christopher Schultz wrote:
>>> All,
>>>
>>> I'd like a review of the test-case I wrote for the multipart
>>> config stuff.
>>>
>>> It *works*, but perhaps there are better ways to do the things
>>> that I did.
>>>
>>> Someone who is more familiar with all the various ways of
>>> testing Tomcat would probably be able to replace some of my hacks
>>> with something a little more straightforward.
> 
>> I don't see anything that jumps out at me as needing to be
>> changed.
> 
> Excellent, thanks. Using reflection to force my way into those private
> methods seemed a little ugly. I'm not familiar enough with the rest of
> the unit tests to know if that's an often-used technique or if there
> was a better way of exposing the internals for a unit-test.

You could make the relevant methods package private but personally I
dislike that more than reflection in the tests. YMMV.

Mark

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


Re: CTR: requesting review of org.apache.catalina.startup.TestMultipartConfig

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 4/28/20 14:03, Mark Thomas wrote:
> On 28/04/2020 15:22, Christopher Schultz wrote:
>> All,
>>
>> I'd like a review of the test-case I wrote for the multipart
>> config stuff.
>>
>> It *works*, but perhaps there are better ways to do the things
>> that I did.
>>
>> Someone who is more familiar with all the various ways of
>> testing Tomcat would probably be able to replace some of my hacks
>> with something a little more straightforward.
>
> I don't see anything that jumps out at me as needing to be
> changed.

Excellent, thanks. Using reflection to force my way into those private
methods seemed a little ugly. I'm not familiar enough with the rest of
the unit tests to know if that's an often-used technique or if there
was a better way of exposing the internals for a unit-test.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl6psB0ACgkQHPApP6U8
pFi5NhAAsyYBPv2QefM2iIFZhr8/3GnIaoCGLsslx2WNUJStj9RMVEPoJ4pa9EZ0
zxgIUPY7t4RFQ993WzntrK43JNPqS5cQ2U+KhfL86VbHGhl5Ka3ypfZLLQkPT1ER
dwJI4bE8Lp8MyRR7GuxJbLmLUmWzTBEXpxwMcBrATKQQmIkaF30fwCiTVJdWpF78
LoKYd7yHuvH4EWUWGqMpaUoRzUW5dvXA66tzfOPic2/6hTk+cghQt1Hu5M+/jjjI
sRXlle2P1TfTKc96Wr4i+hMiK7KbHKgbkPX9UHhagdE109Ldxqspk0mR4E3mR2gs
yHB1KTbLO5sxQcDuP/uuyM+1u7pyIDTkNTlzvEQfQaPd91FzWOpXZNFxwxRozbXH
E3Ftfj9ESHf390YKT0EmlG2x96PDkLHglRy0ooZTMn32GziY2u0wFXhrRVswTnVk
WDjYxJi7MK+vFL5OzFOFLMK0UBWc13iLU3TGpsudlf0bt9eSALG/7RPdgXxtTOJl
K7SQu0BqzTakS6eT/CFMjyIZfxPhwHsKOau+Dni70ZHOTs6rEOvVsTok2eDTWvdD
F421+sIstucFJIKLfbaivMiIUumPZCs9bgkeTJ5DfwQUJsIXN+GgVjCkGaStL+MO
6SzQbhg6LkiHQm1MWL5hwKGN3Q5WOKXDOmXVlwGoYybbq8IOMNk=
=RIEq
-----END PGP SIGNATURE-----

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


Re: CTR: requesting review of org.apache.catalina.startup.TestMultipartConfig

Posted by Mark Thomas <ma...@apache.org>.
On 28/04/2020 15:22, Christopher Schultz wrote:
> All,
> 
> I'd like a review of the test-case I wrote for the multipart config stuff.
> 
> It *works*, but perhaps there are better ways to do the things that I did.
> 
> Someone who is more familiar with all the various ways of testing
> Tomcat would probably be able to replace some of my hacks with
> something a little more straightforward.

I don't see anything that jumps out at me as needing to be changed.

Mark

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