commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: [scxml] transition leaving a child state of parallel
Date Mon, 06 Jun 2011 23:02:40 GMT
On Mon, Jun 6, 2011 at 4:24 PM, Enrico Nardelli
<> wrote:
> Rahul Akolkar wrote:
>> I can't see why it should error out either. Please open a defect in
>> JIRA [1] with above SCXML document and I'll take a look.
> I opened it

Thanks, I've checked in a fix, which you may verify by building [A]
from source. More on providing test cases below.

> Rahul Akolkar wrote:
>> If you're so inclined, a patch with a (failing) JUnit test -- see
>> existing test suite [2] for inspiration -- would make it even easier.
>> -Rahul
>> [1]
>> [2]
> I would be glad to contribute more,

Excellent :-)

> but I am not sure whether I'll be able
> to do what you are suggesting. I know very little about JUnit...
> If I've undertstood well I should upload under the directory in reference
> [2], probably in subdirectory model, a file called e.g
> ParallelTest<something>.java and corresponding file parallel<something>.xml.
> The first file containing a JUnit test case having in input the second file
> and failing.
> Is that correct?

Yes, the outline is correct, though you'd attach a patch in JIRA
rather than upload anything. More on creating and submitting patches
here [B].

By way of example, you may look at r1132819 [C], in which I've checked
in a fix for this issue. To start, I took the test case you provided
(added as new file transitions-05.xml) and added a JUnit test (see
text changed for -- I added the test to
existing file rather than creating a new one, but one could've created
ParallelTest<something>.java as you mention instead). The JUnit test
is actually quite easy to write since we have a number of test utility
functions to help. As you can see, it was basically 6-7 lines of
simple Java code based on your description. The test failed as you
indicated, then I made a fix to the source locally so it passed, and
checked in the fix as well (see change in A good
failing test case illustrating the bug is usually halfway to fixing
it, so bug reporters can help with such patches (with or without
actual fixes themselves).

Please let me know if any of the above needs more clarification.



> - Enrico

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message