Keith D Gregory (JIRA)
Sat, 16 Aug 2008 07:06:35 -0700
[
https://issues.apache.org/jira/browse/CACTUS-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623124#action_12623124
]
Keith D Gregory commented on CACTUS-256:
----------------------------------------
Work and Real Life(tm) has kept me from this, but look for something in the
September/October timeframe.
> ServletTestRunner should build test redirector URL from incoming request, not
> use CACTUS_CONTEXT_URL_PROPERTY unless instructed
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: CACTUS-256
> URL: https://issues.apache.org/jira/browse/CACTUS-256
> Project: Cactus
> Issue Type: Improvement
> Components: Framework
> Affects Versions: 1.7.2, 1.8
> Reporter: Keith D Gregory
>
> The first time ServletTestRunner gets invoked, it builds the context URL for
> the actual test requests, and saves it in the system property
> "cactus.contextURL" (BaseConfiguration.CACTUS_CONTEXT_URL_PROPERTY). All
> subsequent requests then use that property value, ignoring the actual request
> URL. This is bad on several levels.
> First, because it's impolite to set system-wide properties in a shared
> execution environment.
> Second, and more important, because it prevents running tests in an
> environment that uses virtual homes and extracts information from the request
> URL. If you want to have particular behavior for requests to
> "foo.example.com", and have already run tests for "bar.example.com", you have
> to restart your container. Or spend a couple hours with a debugger and the
> Cactus source code, trying to figure out why your tests are failing (no, I'm
> not bitter :-)).
> And third (just throwing this in for good measure), because it breaks the
> JUnit premise that tests execute in isolation, and are not dependent on
> execution order.
> Personally, I can't see a reason for caching this value. It's not terribly
> expensive to create it anew for each run. For those people who do want to
> have their first test influence all subsequent tests, it could be a request
> parameter ("rememberThisHost=yes").
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]