Rock on!
Looks like the JavaScript one was a problem with my syntax? I can't
say I understand it since my actual JavaScript code uses foo['bar'] to
access JavaScript hashes or whatever, but if foo('bar') is needed in
this case, OK. Probably just speaks to my limited knowledge of
JavaScript. :)
So as I understand the Jython situation now, when writing a Jython
expression, you must always prefix it with "result = ". I think
that's a workaround we could document and say it works.
Still, it would be nice in the future to find a different way to
invoke the Jython to make that "result = " part unnecessary. Maybe
Dave and I can look into that.
Thanks,
Aaron
P.S. The camel-script tests only work under Java 6 for me -- I guess
probably some of the script engine JARs were built with Java 6 because
I'm getting unsupported class version errors on Java 5 even when I
rebuilt all of Camel with Java 5?
On Thu, Jul 3, 2008 at 4:48 AM, Willem Jiang <[EMAIL PROTECTED]> wrote:
> Got all the tests in camel-script passed.
> Please add more unit tests so we can keep camel evolving ;)
>
> Willem
> Aaron Mulder wrote:
>>
>> I would prefer to see Bamboo fail at the end. But as far as
>> commenting out tests goes, it seems to me the point of a unit test is
>> to show whether something works, and commenting-out every unit test
>> that fails really means the unit tests as a whole are pretty
>> worthless. I would rather comment out Bamboo and let the unit tests
>> accurately reflect the state of the project. :)
>>
>> As far as the scripting issues and 1.4/1.5, I don't have a big
>> personal interest in whether the issues get fixed, it just seems kind
>> of cheesy that the Web site talks all about these different scripting
>> languages and how they work great for this and that, but then you try
>> them, and they turn out to be totally broken. Perhaps if we don't
>> plan to put fixes in, we should update the Web site pages for Jython
>> and JavaScript (and I haven't tried PHP and some of the others yet!)
>> to indicate that they don't actually work. At least we won't be
>> misleading anyone that way. (Of course, it may just be my scripting
>> syntax that's the problem, but I was hoping someone had worked with
>> those features and would know :)
>>
>> Thanks,
>> Aaron
>>
>> On Wed, Jul 2, 2008 at 9:15 PM, Willem Jiang <[EMAIL PROTECTED]>
>> wrote:
>>
>>>
>>> Since your are meeting with a known issue which filled in JIRA, so I
>>> comment
>>> out the unit test to let bamboo keep running.
>>> If you take a look at bamboo's building log , you will find that it will
>>> not
>>> build the remain modules if it get a test failure.
>>> Maybe we need change the bamboo's build scrip to let it use -fae ( fail
>>> at
>>> end) options.
>>>
>>> BTW, We are going to release Camel 1.4.0 this week, if we can't get your
>>> issue fixed on time , I'd like to comment it out for moving it into the
>>> 1.5.0.
>>>
>>> The JIRA for your issue could keep the unit test in our mind :)
>>>
>>> Willem
>>> Aaron Mulder wrote:
>>>
>>>>
>>>> So I've been wrangling with various scripting languages in Camel
>>>> expressions.
>>>>
>>>> I think I've determined that JavaScript and Python are broken, because
>>>> the expressions when invoked via JSR-223 always evaluate to null or
>>>> false. It looks like that might be fixed by changing the way the
>>>> script is invoked.
>>>>
>>>> Anyway, James asked me to put in unit tests to demonstrate the
>>>> problem, so I did. Unfortunately, there are a number of unit tests in
>>>> the camel-script module that were previously failing and commented
>>>> out, for reasons that aren't clear to me (though I didn't really
>>>> investigate).
>>>>
>>>> The problem is, someone immediately commented out my new unit tests
>>>> too, because they caused the Bamboo build to fail. And that's a
>>>> problem because now they're just in the mess of "failing unit tests
>>>> being ignored" instead of "failing tests demonstrating a problem that
>>>> needs to be fixed".
>>>>
>>>> So I guess I'd like to ask that the Bamboo maintainer not comment out
>>>> these tests, even though it will cause the build to fail if tests are
>>>> enabled. If that's not acceptable, if all failing unit tests will
>>>> just be commented out, then it seems to me there's little reason to
>>>> *write* unit tests. But I'm open to suggestions on this one.
>>>>
>>>> Thanks,
>>>> Aaron
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>