GWT Style Test Coordination in JConch

4 views
Skip to first unread message

Hamlet D'Arcy

unread,
Dec 14, 2009, 11:44:03 AM12/14/09
to JConch Discussion Group
Robert,

Want to have an object to do GWT style asynchronous test coordination
in jconch-test?

I can send you a patch or check it in for review.

--
Hamlet D'Arcy

Robert Fischer

unread,
Dec 14, 2009, 11:56:51 AM12/14/09
to jco...@googlegroups.com
I'm not sure what "asynchronous test coordination" means.

~~ Robert.
> --
>
> You received this message because you are subscribed to the Google Groups "JConch Discussion Group" group.
> To post to this group, send email to jco...@googlegroups.com.
> To unsubscribe from this group, send email to jconch+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/jconch?hl=en.
>
>

Hamlet D'Arcy

unread,
Dec 14, 2009, 12:08:27 PM12/14/09
to JConch Discussion Group
Then I will send a patch and examples!



On Dec 14, 10:56 am, Robert Fischer <robert.fisc...@smokejumperit.com>
wrote:

Hamlet D'Arcy

unread,
Dec 15, 2009, 9:43:25 AM12/15/09
to JConch Discussion Group
I created an issue and attached a patch. In general, I'd like a test
case like this to pass:

import jconch.testing.TestCoordinator

TestCoordinator coord = new TestCoordinator()

MyComponent component = new MyComponent()
component.addActionListener({ ActionEvent e ->
assert e.source != null
assert "click" == e.actionCommand
coord.finishTest()
} as ActionListener)

component.click()
coord.delayTestFinish()

component.click()
coord.delayTestFinish(1000)

component.click()
coord.delayTestFinish(1, TimeUnit.SECONDS)

The TestCoordinator is a replacement for manually managing
CountDownLatch objects to perform this type of behavior. (or even
wait/join). Also, it is reusable/resettable which CountDownLatch is
not.

I use something similar at work and like it. I saw that GWT has
something similar, so I copied the GWT API and rewrote it for JConch.

What are your thoughts?

--
Hamlet D'Arcy
haml...@gmail.com

Hamlet D'Arcy

unread,
Dec 18, 2009, 10:11:58 AM12/18/09
to JConch Discussion Group
What do you think?

Should I check it in?

http://code.google.com/p/jconch/issues/detail?id=5

--
Hamlet D'Arcy
haml...@gmail.com

Robert Fischer

unread,
Dec 18, 2009, 1:48:11 PM12/18/09
to jco...@googlegroups.com
Yeah, definitely check it in.

Hamlet D'Arcy

unread,
Dec 18, 2009, 2:36:15 PM12/18/09
to jco...@googlegroups.com
Cool.

I'll check it in, close the ticket, and then write a blog post.

I don't plan on any other additions, so maybe push out JConch 1.2?

--
Hamlet D'Arcy
haml...@gmail.com

Reply all
Reply to author
Forward
0 new messages