On Tue, 9 Dec 2003, Joe Germuska wrote:
> Rob Leland wrote:
>
> > > For what it's worth, I've got it passing 71/97 tests clear, and the
> > > rest fall into two categories: 19 with failures because the
> > > context-path of the test app is hardcoded as "test" and the plugin
> > uses
> > > "struts-cactus", and 7 that have to do with cookie values. If anyone
> > > has any clever ideas for the simplest way to extract the context path
> >
> > The context path used for the test is stored in the build.properties
> > file.
> > Couldn't those properties be read in by the unit tests ? Right now they
> > are used to modify the server.xml file by using ant filtering while
> > copying.
> >
> > Also if you look at the CVS history of those files with a
> > hard coded 'test' context you'll probably see the path change
> > from /test/xyz/abc.jsp -> /xyz/abc.jsp -> /test/xyz/abc.jsp
> >
>
> Well, I just changed the string literal in response.encodeURL to the
> concatenation of request.getContextPath() and the context relative URL.
> That worked, and seems decently flexible.
>
> So now the only mystery is why cookies don't seem to be set in my
> cactus environment (the common problem in the remaining tests which
> don't pass.)
Wish I could shed some light on this, but I haven't been able to figure
out what changed in our configuration to cause the cactus tests to fail
for any of the tests that I wrote.
So, for now I just commented out those few lines and now the tests pass
completely under tomcat 4.0, but under 4.1 it fails randomly with:
...
...
[junit] Testcase: testMessageTag2ArgNameNoScopeDefaultBundle_fr took
0.02 sec
[junit] Testcase:
testMessageTag2ArgNameApplicationScopeDefaultBundle_fr took 0 sec
[junit] Caused an ERROR
[junit] Address already in use: connect
[junit] java.net.BindException: Address already in use: connect
[junit] at java.net.PlainSocketImpl.socketConnect(Native Method)
...
...
If I close down a few extract programs it will get a bit farther, which
leads me to assume that it is a memory issue for my machine.
When attempting to "maven" on a clean checkout, I get this:
...
...
test:test:
[junit] dir attribute ignored if running in the same VM
[junit] Running org.apache.struts.action.TestDynaActionForm
[junit] Tests run: 44, Failures: 0, Errors: 0, Time elapsed: 0.19 sec
[junit] dir attribute ignored if running in the same VM
[junit] Running org.apache.struts.action.TestDynaActionFormClass
[junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.12 sec
[junit] dir attribute ignored if running in the same VM
[junit] Running org.apache.struts.config.TestActionConfigMatcher
[junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.16 sec
[junit] dir attribute ignored if running in the same VM
[junit] Running org.apache.struts.config.TestModuleConfig
junit.framework.AssertionFailedError: Got an input stream for
struts-config.xml
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNotNull(Assert.java:220)
at
org.apache.struts.config.TestModuleConfig.testParse(TestModuleConfig.java:163)
...
...
Oh well, wish I could help more.
>
> Joe
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "We want beef in dessert if we can get it there."
> -- Betty Hogan, Director of New Product Development, National
> Cattlemen's Beef Association
>
>
--
James Mitchell
Software Developer / Struts Evangelist
http://www.struts-atlanta.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]