On Mon, 29 Mar 2004, Niall Pemberton wrote:

> I think its the ExceptionTest which is failing and it looks like it should
> from the code. There are three tests in ExceptionTest - only one has code to
> "pass" the test if it gets the Exception its expecting - the other two are
> set to "fail".
>
> The two test which have failures have code to "pass" the test if the
> expected Exception is received but its been commented out and replaced with
> "fail" code. Theres a note saying "This will be true in Validator 2.0" above
> the commented out code in one of the tests but that doesn't really explain
> why the tests have been set up to throw an exception and then "fail".
>
> I think the bugs are in the test!

No, the problems I'm seeing are definitely in the e-mail tests. I've
attached the Maven rest reports for the e-mail and exception tests, in
which you can see that the former failed, while the latter succeeded.

--
Martin Cooper


>
> Niall
>
>
> ----- Original Message -----
> From: "Martin Cooper" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 29, 2004 2:46 AM
> Subject: [Validator] Unit tests failing
>
>
> > The e-mail test is failing for me, with the stack trace below.
> >
> > Ideas, anyone?
> >
> > --
> > Martin Cooper
> >
> >
> >     [junit] Running org.apache.commons.validator.EmailTest
> >     [junit] Tests run: 8, Failures: 2, Errors: 0, Time elapsed: 1.913 sec
> >     [junit] [ERROR] TEST org.apache.commons.validator.EmailTest FAILED
> >     [junit] dir attribute ignored if running in the same VM
> >     [junit] Running org.apache.commons.validator.ExceptionTest Mar 28,
> > 2004 5:32:49 PM org.apache.commons.validator.ValidatorAction executeVali
> > dationMethod SEVERE: Unhandled exception thrown during validation:
> > RUNTIME-EXCEPTION java.lang.RuntimeException: RUNTIME-EXCEPTION
> >         at
> > org.apache.commons.validator.TestValidator.validateRaiseException(Tes
> > tValidator.java:53)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > java:39)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > sorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at
> > org.apache.commons.validator.ValidatorAction.executeValidationMethod(
> > ValidatorAction.java:570)
> >         at
> > org.apache.commons.validator.Field.validateForRule(Field.java:808)
> >         at org.apache.commons.validator.Field.validate(Field.java:887)
> >         at org.apache.commons.validator.Form.validate(Form.java:171)
> >         at
> > org.apache.commons.validator.Validator.validate(Validator.java:367)
> >         at
> > org.apache.commons.validator.ExceptionTest.testRuntimeException(Excep
> > tionTest.java:98)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > java:39)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > sorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at junit.framework.TestCase.runTest(TestCase.java:154)
> >         at junit.framework.TestCase.runBare(TestCase.java:127)
> >         at junit.framework.TestResult$1.protect(TestResult.java:106)
> >         at junit.framework.TestResult.runProtected(TestResult.java:124)
> >         at junit.framework.TestResult.run(TestResult.java:109)
> >         at junit.framework.TestCase.run(TestCase.java:118)
> >         at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >         at junit.framework.TestSuite.run(TestSuite.java:203)
> >         at
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUni
> > tTestRunner.java:325)
> >         at
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JU
> > nitTask.java:848)
> >         at
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
> > ask.java:556)
> >         at
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
> > ask.java:532)
> >         at org.apache.tools.ant.Task.perform(Task.java:341)
> >         at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
> >         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
> >         at
> > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
> >         at
> > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
> >         at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
> >         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
> >         at
> > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
> >         at
> > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
> >         at
> > com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
> >         at com.werken.werkz.Goal.fire(Goal.java:639)
> >         at com.werken.werkz.Goal.attain(Goal.java:575)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at
> > org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java: 448)
> >         at
> > org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
> >         at org.apache.maven.cli.App.doMain(App.java:543)
> >         at org.apache.maven.cli.App.main(App.java:1109)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > java:39)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > sorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at com.werken.forehead.Forehead.run(Forehead.java:551)
> >         at com.werken.forehead.Forehead.main(Forehead.java:581) Mar 28,
> > 2004 5:32:50 PM org.apache.commons.validator.ValidatorAction executeVali
> > dationMethod SEVERE: Unhandled exception thrown during validation:
> > CHECKED-EXCEPTION java.lang.Exception: CHECKED-EXCEPTION
> >         at
> > org.apache.commons.validator.TestValidator.validateRaiseException(Tes
> > tValidator.java:56)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > java:39)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > sorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at
> > org.apache.commons.validator.ValidatorAction.executeValidationMethod(
> > ValidatorAction.java:570)
> >         at
> > org.apache.commons.validator.Field.validateForRule(Field.java:808)
> >         at org.apache.commons.validator.Field.validate(Field.java:887)
> >         at org.apache.commons.validator.Form.validate(Form.java:171)
> >         at
> > org.apache.commons.validator.Validator.validate(Validator.java:367)
> >         at
> > org.apache.commons.validator.ExceptionTest.testCheckedException(Excep
> > tionTest.java:127)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > java:39)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > sorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at junit.framework.TestCase.runTest(TestCase.java:154)
> >         at junit.framework.TestCase.runBare(TestCase.java:127)
> >         at junit.framework.TestResult$1.protect(TestResult.java:106)
> >         at junit.framework.TestResult.runProtected(TestResult.java:124)
> >         at junit.framework.TestResult.run(TestResult.java:109)
> >         at junit.framework.TestCase.run(TestCase.java:118)
> >         at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >         at junit.framework.TestSuite.run(TestSuite.java:203)
> >         at
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUni
> > tTestRunner.java:325)
> >         at
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JU
> > nitTask.java:848)
> >         at
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
> > ask.java:556)
> >         at
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitT
> > ask.java:532)
> >         at org.apache.tools.ant.Task.perform(Task.java:341)
> >         at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
> >         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
> >         at
> > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
> >         at
> > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
> >         at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)
> >         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
> >         at
> > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
> >         at
> > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
> >         at
> > com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)
> >         at com.werken.werkz.Goal.fire(Goal.java:639)
> >         at com.werken.werkz.Goal.attain(Goal.java:575)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)
> >         at com.werken.werkz.Goal.attain(Goal.java:573)
> >         at
> > org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java: 448)
> >         at
> > org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
> >         at org.apache.maven.cli.App.doMain(App.java:543)
> >         at org.apache.maven.cli.App.main(App.java:1109)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > java:39)
> >         at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > sorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:324)
> >         at com.werken.forehead.Forehead.run(Forehead.java:551)
> >         at com.werken.forehead.Forehead.main(Forehead.java:581)
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
Testsuite: org.apache.commons.validator.EmailTest

Tests run: 8, Failures: 2, Errors: 0, Time elapsed: 1.913 sec



Testcase: testEmailFromPerl took 0.942 sec

        FAILED

Value [EMAIL PROTECTED] ValidatorResult for the 'email' action should have passed.

junit.framework.AssertionFailedError: Value [EMAIL PROTECTED] ValidatorResult for the 
'email' action should have passed.

        at org.apache.commons.validator.EmailTest.valueTest(EmailTest.java:382)

        at org.apache.commons.validator.EmailTest.testEmailFromPerl(EmailTest.java:349)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)

        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

        at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)

        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

        at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)

        at com.werken.werkz.Goal.fire(Goal.java:639)

        at com.werken.werkz.Goal.attain(Goal.java:575)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448)

        at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)

        at org.apache.maven.cli.App.doMain(App.java:543)

        at org.apache.maven.cli.App.main(App.java:1109)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at com.werken.forehead.Forehead.run(Forehead.java:551)

        at com.werken.forehead.Forehead.main(Forehead.java:581)



Testcase: testEmailFromPerlTestcase: testEmail took 0.08 sec

Testcase: testEmailExtension took 0.36 sec

Testcase: testEmailWithDash took 0.09 sec

Testcase: testEmailWithDotEnd took 0.1 sec

Testcase: testEmailWithBogusCharacter took 0.081 sec

Testcase: testEmailWithCommas took 0.09 sec

Testcase: testEmailUserName took 0.14 sec

        FAILED

Value [EMAIL PROTECTED] for the 'email' action should have failed.

junit.framework.AssertionFailedError: Value [EMAIL PROTECTED] for the 'email' action 
should have failed.

        at org.apache.commons.validator.EmailTest.valueTest(EmailTest.java:382)

        at org.apache.commons.validator.EmailTest.testEmailUserName(EmailTest.java:209)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)

        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

        at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:88)

        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)

        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)

        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)

        at com.werken.werkz.jelly.GoalTag$1.performAction(GoalTag.java:128)

        at com.werken.werkz.Goal.fire(Goal.java:639)

        at com.werken.werkz.Goal.attain(Goal.java:575)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at com.werken.werkz.Goal.attainPrecursors(Goal.java:488)

        at com.werken.werkz.Goal.attain(Goal.java:573)

        at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:448)

        at org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)

        at org.apache.maven.cli.App.doMain(App.java:543)

        at org.apache.maven.cli.App.main(App.java:1109)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at com.werken.forehead.Forehead.run(Forehead.java:551)

        at com.werken.forehead.Forehead.main(Forehead.java:581)



Testcase: testEmailUserName
Testsuite: org.apache.commons.validator.ExceptionTest

Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 1.783 sec



Testcase: testValidatorException took 0.721 sec

Testcase: testRuntimeException took 0.671 sec

Testcase: testCheckedException took 0.34 sec

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to