Simon Nash wrote:
I did a recent svn update and rebuild and I'm seeing the following test
error from the helloworld-bpel sample. Are other people seeing this?
Any ideas?
Simon
I have committed a fix (or at least a workaround) for this build
break problem. The revision number is r663938.
I debugged the problem and it is caused by the BPELInvoker returning
an XML element for a part:
<TestPart><hello
xmlns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl">
<message>Hello World</message></hello></TestPart>
instead of returning an XML element for the wrapper inside the part:
<hello
xmlns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl">
<message>Hello World</message></hello>
I modified the BPELInvoker to return the part's child element instead
of the part itself.
To avoid problems like this in future, please can folks run all the
samples and itests before doing a commit, to ensure their code change
doesn't cause problems for others. Thanks.
Simon
Running helloworld.BPELHelloWorldTestCase
Completed calling new Process deployment code...
Invoking bpel component : {http://tuscany.apache.org}helloPartnerLink#hello
Creating invocation message:
>> args.....: <?xml version="1.0" encoding="UTF-8"?>
<hello
xmlns="http://tuscany.apache.org/implementation/bpel/example/helloworld.w
sdl"><message>Hello</message></hello>
>> message..:<?xml version="1.0" encoding="UTF-8"?>
<message><TestPart><hello
xmlns="http://tuscany.apache.org/implementation/bpel/e
xample/helloworld.wsdl"><message>Hello</message></hello></TestPart></message>
>>>Invocation status:RESPONSE
>>>Response:
<?xml version="1.0" encoding="UTF-8"?>
<message><TestPart><hello
xmlns="http://tuscany.apache.org/implementation/bpel/e
xample/helloworld.wsdl"><message>Hello
World</message></hello></TestPart></messa
ge>
>>>Response:
<?xml version="1.0" encoding="UTF-8"?>
<message><TestPart><hello
xmlns="http://tuscany.apache.org/implementation/bpel/e
xample/helloworld.wsdl"><message>Hello
World</message></hello></TestPart></messa
ge>
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 9.512
sec <<< FA
ILURE!
testInvoke(helloworld.BPELHelloWorldTestCase) Time elapsed: 9.494 sec
<<< ERRO
R!
junit.framework.ComparisonFailure: expected:<Hello World> but was:<>
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
at
helloworld.BPELHelloWorldTestCase.testInvoke(BPELHelloWorldTestCase.j
ava:57)
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:585)
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.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.
java:35)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
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:585)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:308)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:879)
Results :
Tests in error:
testInvoke(helloworld.BPELHelloWorldTestCase)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0