[ 
https://issues.apache.org/jira/browse/TUSCANY-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585475#action_12585475
 ] 

Mark Combellack commented on TUSCANY-2198:
------------------------------------------

This error only occurs ocassionally on the Continuum server. It builds without 
issue on my local machine.

Investigating further, the code does:

        customer.purchaseBooks();
        assertFalse(customer.hasOutstandingOrders());

The purchaseBooks method calls several methods and then the notifyShipment() 
method is called to notify the customer that the order has been shipped. In the 
notifyShipment() method, the order is cleared from the list of Outstanding 
Orders

The issue is that the notifyShipment() method is @OneWay so is executed 
asynchronously. When the Continuum server is heavily loaded, the assert in the 
code above is executed before the notifyShipment() method is called. As a 
result, the assert fails.


To fix this bug, we must allow some time for the notifyShipment() method to 
complete before doing the assert.

> Apache Tuscany SCA OSGi-SCA Integration Tests fail to build on the Continuum 
> build server
> -----------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2198
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2198
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA OSGi Integration
>    Affects Versions: Java-SCA-Next
>            Reporter: Mark Combellack
>            Assignee: Mark Combellack
>             Fix For: Java-SCA-Next
>
>
> The build of itest/osgi-implementation has jsut failed on the Continuum build 
> server.
> The build output is at:
> http://vmbuild.apache.org/continuum/buildResult.action?buildId=73096&projectId=277
> The relevant fragment is:
> Created OSGiCustomerComponentImpl [EMAIL PROTECTED]
> Activated OSGiCustomerComponentImpl bundle 
> OSGiCustomerComponentImpl.purchaseBooks, retailer1 is [Proxy - [EMAIL 
> PROTECTED]
> Activated OSGiRetailerComponentImpl bundle 
> OSGiRetailerComponentImpl.submitOrder , warehouse is [Proxy - [EMAIL 
> PROTECTED]
> JavaWarehouseComponentImpl.fulfillOrder : shipper is [Proxy - [EMAIL 
> PROTECTED]
> Activated OSGiShipperComponentImpl bundle 
> OSGiShipperComponentImpl.processShipment, customer is [Proxy - [EMAIL 
> PROTECTED]
> Deactivated OSGiShipperComponentImpl bundle 
> Deactivated OSGiCustomerComponentImpl bundle 
> Created OSGiCustomerComponentImpl [EMAIL PROTECTED]
> Activated OSGiCustomerComponentImpl bundle 
> Deactivated OSGiCustomerComponentImpl bundle 
> Deactivated OSGiRetailerComponentImpl bundle 
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.713 sec <<< 
> FAILURE!
> test(supplychain.factory.DSFactoryTestCase)  Time elapsed: 0.701 sec  <<< 
> FAILURE!
> junit.framework.AssertionFailedError: null
>       at junit.framework.Assert.fail(Assert.java:47)
>       at junit.framework.Assert.assertTrue(Assert.java:20)
>       at junit.framework.Assert.assertFalse(Assert.java:34)
>       at junit.framework.Assert.assertFalse(Assert.java:41)
>       at supplychain.factory.FactoryTestCase.test(FactoryTestCase.java:42)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at junit.framework.TestCase.runTest(TestCase.java:168)
>       at junit.framework.TestCase.runBare(TestCase.java:134)
>       at junit.framework.TestResult$1.protect(TestResult.java:110)
>       at junit.framework.TestResult.runProtected(TestResult.java:128)
>       at junit.framework.TestResult.run(TestResult.java:113)
>       at junit.framework.TestCase.run(TestCase.java:124)
>       at junit.framework.TestSuite.runTest(TestSuite.java:232)
>       at junit.framework.TestSuite.run(TestSuite.java:227)
>       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.executeTestSet(AbstractDirectoryTestSuite.java:138)
>       at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.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(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
>       at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to