I am running the testcase via ant as this is the only way I can run the
test.

The Job itself fires twice in the test, but I still get this failure:
(current thread not owner)

[junit] Running com.baselogic.yoursos.scheduler.SchedulerBuilderTest
    [junit] (impl.StdSchedulerFactory            702 ) Quartz scheduler
'TestScheduler' initialized from default file in current working dir:
'quartz.properties'
    [junit] (impl.StdSchedulerFactory            708 ) Quartz scheduler
version: 1.2.3
    [junit] java.lang.IllegalMonitorStateException: current thread not owner
    [junit] Start time for AlertSenderTrigger: Sun Apr 04 14:00:00 PDT 1999
    [junit]  at java.lang.Object.wait(Native Method)
    [junit] (jobs.AlertSenderJob                 31  ) initialize
AlertSenderJob
    [junit] (core.QuartzScheduler                327 ) Scheduler
TestScheduler_$_one started.
    [junit]  at
com.baselogic.yoursos.scheduler.SchedulerBuilderTest.testBuilder(SchedulerBu
ilderTest.java:84)
    [junit]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit] (jobs.AlertSenderJob                 43  ) Executing
AlertSenderJob. This is the only operation this job performs.
    [junit]  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    [junit]  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    [junit]  at java.lang.reflect.Method.invoke(Method.java:324)
    [junit]  at junit.framework.TestCase.runTest(TestCase.java:154)
    [junit]  at junit.framework.TestCase.runBare(TestCase.java:127)
    [junit]  at junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit]  at junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]  at junit.framework.TestResult.run(TestResult.java:109)
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.937 sec
    [junit] Testsuite: com.baselogic.yoursos.scheduler.SchedulerBuilderTest
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.937 sec

    [junit] ------------- Standard Output ---------------
    [junit]  at junit.framework.TestCase.run(TestCase.java:118)
    [junit]  at junit.framework.TestSuite.runTest(TestSuite.java:208)
    [junit]  at junit.framework.TestSuite.run(TestSuite.java:203)
    [junit]  at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRu
nner.java:325)
    [junit]  at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestR
unner.java:536)
    [junit] (impl.StdSchedulerFactory            702 ) Quartz scheduler
'TestScheduler' initialized from default file in current working dir:
'quartz.properties'
    [junit] (impl.StdSchedulerFactory            708 ) Quartz scheduler
version: 1.2.3
    [junit] Start time for AlertSenderTrigger: Sun Apr 04 14:00:00 PDT 1999
    [junit] (jobs.AlertSenderJob                 31  ) initialize
AlertSenderJob
    [junit] (core.QuartzScheduler                327 ) Scheduler
TestScheduler_$_one started.
    [junit] (jobs.AlertSenderJob                 43  ) Executing
AlertSenderJob. This is the only operation this job performs.
    [junit] ------------- ---------------- ---------------
    [junit] ------------- Standard Error -----------------
    [junit] java.lang.IllegalMonitorStateException: current thread not owner
    [junit]  at java.lang.Object.wait(Native Method)
    [junit]  at
com.baselogic.yoursos.scheduler.SchedulerBuilderTest.testBuilder(SchedulerBu
ilderTest.java:84)
    [junit]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    [junit]  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
    [junit]  at java.lang.reflect.Method.invoke(Method.java:324)
    [junit]  at junit.framework.TestCase.runTest(TestCase.java:154)
    [junit]  at junit.framework.TestCase.runBare(TestCase.java:127)
    [junit]  at junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit]  at junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]  at junit.framework.TestResult.run(TestResult.java:109)
    [junit]  at junit.framework.TestCase.run(TestCase.java:118)
    [junit]  at junit.framework.TestSuite.runTest(TestSuite.java:208)
    [junit]  at junit.framework.TestSuite.run(TestSuite.java:203)
    [junit]  at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRu
nner.java:325)
    [junit]  at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestR
unner.java:536)
    [junit] ------------- ---------------- ---------------
    [junit] Testcase:
testBuilder(com.baselogic.yoursos.scheduler.SchedulerBuilderTest): FAILED
    [junit] current thread not owner
    [junit] junit.framework.AssertionFailedError: current thread not owner
    [junit]  at
com.baselogic.yoursos.scheduler.SchedulerBuilderTest.testBuilder(SchedulerBu
ilderTest.java:88)
    [junit]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
    [junit]  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)


    [junit] (jobs.AlertSenderJob                 31  ) initialize
AlertSenderJob
    [junit] (jobs.AlertSenderJob                 31  ) initialize
AlertSenderJob
    [junit] (jobs.AlertSenderJob                 43  ) Executing
AlertSenderJob. This is the only operation this job performs.
    [junit] (jobs.AlertSenderJob                 43  ) Executing
AlertSenderJob. This is the only operation this job performs.

---
Thanks
Mick Knutson

The world is a playground...Play Hard, Play Smart.
Visit  http://www.YourSoS.com to learn how our "Personal Emergency Alert &
Contact System" can help you Play Smart.


+00 1 (877) SoS-9119
+00 1 (708) 570-2772 Fax
---

----- Original Message ----- 
From: "Joe Germuska" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, October 03, 2003 8:54 AM
Subject: Re: Still an issue: Quartz plugin shutdown problem


> At 8:14 -0700 10/3/03, Mick Knutson wrote:
> >I have never run a testcase with XML, how would I do that?
>
> The same way you'd run any other test case.  Write java that does
> just as much of the process you're trying to test as necessary,
> without doing anything that might mess up your test.
>
> In this case, I'd write a method that uses the API of ScheduleBuilder
> to parse the XML file.  Even if I were using JUnit, I might not
> bother asserting anything about it -- sometimes it's enough to know
> that it didn't choke.
>
> Then again, if the Quartz interface for a Schedule is reasonably
> open, it might not be hard to assert that the Schedule which was
> built has the right tasks, they have the right properties, etc.
> Remember that i know next to nothing about Quartz; that stuff was
> written by one of my colleagues who doesn't monitor the lists as
> carefully as I do.
>
> I'll give you a hint: there's a test case in the jgs-quartz
> distribution that does essentially what you want.  Get the source
> code and copy from it until you have what you need.
>
> Joe
>
>
>
> >
> >---
> >Thanks
> >Mick Knutson
> >
> >The world is a playground...Play Hard, Play Smart.
> >Visit  http://www.YourSoS.com to learn how our "Personal Emergency Alert
&
> >Contact System" can help you Play Smart.
> >
> >
> >+00 1 (877) SoS-9119
> >+00 1 (708) 570-2772 Fax
> >---
> >
> >----- Original Message -----
> >From: "Joe Germuska" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Friday, October 03, 2003 6:55 AM
> >Subject: Re: Still an issue: Quartz plugin shutdown problem
> >
> >
> >>  At 19:26 -0700 10/2/03, Mick Knutson wrote:
> >>  >
> >>  >After even more toying, I get a different error about the job not
being
> >set:
> >>  >(any thoughts here?)
> >>
> >>  Mick:
> >>
> >>  Have you tried writing a simple test case that runs your XML file
> >>  through the JGSI Quartz SchedulerBuilder?  You might be better off
> >>  making sure that you can successfully parse the XML outside of your
> >>  EJB container, instead of throwing it into the container for testing.
> >>
> >>  Also, it would help confirm or reject the possibility that it's
> >>  something to do with the container -- since other people say they can
> >>  parse it, that's probably the case, but if you have a test case, you
> >>  can quickly validate changes you make to the XML external to the more
> >>  complex deployment environment.
> >>
> >>  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
> >>
> >>
> >>  ---------------------------------------------------------------------
> >>  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]
>
>
> -- 
> 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
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to