You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Bartosz Kowalewski (JIRA)" <ji...@apache.org> on 2010/07/12 21:52:50 UTC

[jira] Created: (ARIES-355) Web itests - clean-up

Web itests - clean-up
---------------------

                 Key: ARIES-355
                 URL: https://issues.apache.org/jira/browse/ARIES-355
             Project: Aries
          Issue Type: Improvement
          Components: Web
    Affects Versions: 0.2
            Reporter: Bartosz Kowalewski


I've applied some minor changes to the WabConverterITest class. I took a look at this class after seeing logs from build #580 (WabConverterITest failed in #580).However, the changes I propose are not really related with the issue observed in #580 - they are rather meant to do clean up.

In order to get rid of the issue observed in #580 it might be necessary to increase the amount of time this test waits for the WAR URL Stream Handler Service.  TIt currently waits 10 seconds. I guess this could be increased to 15 seconds:
 URLStreamHandlerService warHandler = getOsgiService(URLStreamHandlerService.class, 
      "(url.handler.protocol=webbundle)", 15000);
or even to the default timeout which is 30 seconds.

Changes that applied in the patch
1. fout.close() added
2. Service tracker references kept and closed during test teardown
3. Service tracker used instead of bundleContext.getServiceReferences()
4. There's no need to check urlhandler bundle state. Checking if the WAR URL Stream Handler Service is present should be sufficient.

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


[jira] Resolved: (ARIES-355) Web itests - clean-up

Posted by "Jarek Gawor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarek Gawor resolved ARIES-355.
-------------------------------

         Assignee: Jarek Gawor
    Fix Version/s: 0.2
       Resolution: Fixed

Committed the patch with some changes to trunk (revision 964168). Thanks!

Looks like checking for the url handler service is not enough. There is a small window where the handler service is registered (and waitForService() in the test returns) but the framework doesn't quite know about it just yet. So I modified the test to check if the handler is registered by trying to create a URL with webbundle scheme.


> Web itests - clean-up
> ---------------------
>
>                 Key: ARIES-355
>                 URL: https://issues.apache.org/jira/browse/ARIES-355
>             Project: Aries
>          Issue Type: Improvement
>          Components: Web
>    Affects Versions: 0.2
>            Reporter: Bartosz Kowalewski
>            Assignee: Jarek Gawor
>             Fix For: 0.2
>
>         Attachments: aries-355.patch
>
>
> I've applied some minor changes to the WabConverterITest class. I took a look at this class after seeing logs from build #580 (WabConverterITest failed in #580).However, the changes I propose are not really related with the issue observed in #580 - they are rather meant to do clean up.
> In order to get rid of the issue observed in #580 it might be necessary to increase the amount of time this test waits for the WAR URL Stream Handler Service.  TIt currently waits 10 seconds. I guess this could be increased to 15 seconds:
>  URLStreamHandlerService warHandler = getOsgiService(URLStreamHandlerService.class, 
>       "(url.handler.protocol=webbundle)", 15000);
> or even to the default timeout which is 30 seconds.
> Changes that applied in the patch
> 1. fout.close() added
> 2. Service tracker references kept and closed during test teardown
> 3. Service tracker used instead of bundleContext.getServiceReferences()
> 4. There's no need to check urlhandler bundle state. Checking if the WAR URL Stream Handler Service is present should be sufficient.

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


[jira] Commented: (ARIES-355) Web itests - clean-up

Posted by "Bartosz Kowalewski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888531#action_12888531 ] 

Bartosz Kowalewski commented on ARIES-355:
------------------------------------------

Hi Jarek,

I thought that the implementation that I saw in Equinox some time ago used a service tracker and searched for a reference to a handler for a specific protocol when the given protocol was needed for the first time. If this protocol had already been used, the handler should be returned from some kind of a cache. It it is so, the previous way of verifying that the 'webbundle' protocol handler is ready to be used, would also work. 
However, I don't know how it is implemented in Felix. I also agree that your approach is much safer and does not make any assumptions about the impl of URLStreamHandlerFactory (it does not make any difference whether it is Equinox, Felix or a different container).

Best regards,
  Bartek

> Web itests - clean-up
> ---------------------
>
>                 Key: ARIES-355
>                 URL: https://issues.apache.org/jira/browse/ARIES-355
>             Project: Aries
>          Issue Type: Improvement
>          Components: Web
>    Affects Versions: 0.2
>            Reporter: Bartosz Kowalewski
>            Assignee: Jarek Gawor
>             Fix For: 0.2
>
>         Attachments: aries-355.patch
>
>
> I've applied some minor changes to the WabConverterITest class. I took a look at this class after seeing logs from build #580 (WabConverterITest failed in #580).However, the changes I propose are not really related with the issue observed in #580 - they are rather meant to do clean up.
> In order to get rid of the issue observed in #580 it might be necessary to increase the amount of time this test waits for the WAR URL Stream Handler Service.  TIt currently waits 10 seconds. I guess this could be increased to 15 seconds:
>  URLStreamHandlerService warHandler = getOsgiService(URLStreamHandlerService.class, 
>       "(url.handler.protocol=webbundle)", 15000);
> or even to the default timeout which is 30 seconds.
> Changes that applied in the patch
> 1. fout.close() added
> 2. Service tracker references kept and closed during test teardown
> 3. Service tracker used instead of bundleContext.getServiceReferences()
> 4. There's no need to check urlhandler bundle state. Checking if the WAR URL Stream Handler Service is present should be sufficient.

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


[jira] Updated: (ARIES-355) Web itests - clean-up

Posted by "Bartosz Kowalewski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bartosz Kowalewski updated ARIES-355:
-------------------------------------

    Attachment: aries-355.patch

Attaching the patch.

> Web itests - clean-up
> ---------------------
>
>                 Key: ARIES-355
>                 URL: https://issues.apache.org/jira/browse/ARIES-355
>             Project: Aries
>          Issue Type: Improvement
>          Components: Web
>    Affects Versions: 0.2
>            Reporter: Bartosz Kowalewski
>         Attachments: aries-355.patch
>
>
> I've applied some minor changes to the WabConverterITest class. I took a look at this class after seeing logs from build #580 (WabConverterITest failed in #580).However, the changes I propose are not really related with the issue observed in #580 - they are rather meant to do clean up.
> In order to get rid of the issue observed in #580 it might be necessary to increase the amount of time this test waits for the WAR URL Stream Handler Service.  TIt currently waits 10 seconds. I guess this could be increased to 15 seconds:
>  URLStreamHandlerService warHandler = getOsgiService(URLStreamHandlerService.class, 
>       "(url.handler.protocol=webbundle)", 15000);
> or even to the default timeout which is 30 seconds.
> Changes that applied in the patch
> 1. fout.close() added
> 2. Service tracker references kept and closed during test teardown
> 3. Service tracker used instead of bundleContext.getServiceReferences()
> 4. There's no need to check urlhandler bundle state. Checking if the WAR URL Stream Handler Service is present should be sufficient.

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