[jboss-remoting-issues] [JBoss JIRA] Commented: (JBREM-1256) Unit tests should use unique Xnio instances

Ron Sigal (JIRA) jira-events at lists.jboss.org
Sat Nov 13 12:13:43 EST 2010


    [ https://jira.jboss.org/browse/JBREM-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563250#comment-12563250 ] 

Ron Sigal commented on JBREM-1256:
----------------------------------

1. Added getConfiguredEndpoint(OptionMap optionMap) to org.jboss.remoting3.Remoting, which allows passing an OptionMap with the key org.jboss.remoting3.test.RemotingRootTestBase.XNIO_ID

   public static final Option<String> XNIO_ID = Option.simple(Options.class, "remote.xnio.provider", String.class);

so that an org.jboss.xnio.XNIO with a unique name can be created.

2. Remoting manages a map that associates OptionMaps with Endpoints.

> Unit tests should use unique Xnio instances
> -------------------------------------------
>
>                 Key: JBREM-1256
>                 URL: https://jira.jboss.org/browse/JBREM-1256
>             Project: JBoss Remoting
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.1.0.Beta2
>            Reporter: Ron Sigal
>            Assignee: Ron Sigal
>            Priority: Minor
>             Fix For: 3.1.0.Beta3
>
>
> org.jboss.xnio.Xnio has a default instance which can be acquired by calling Xnio.getInstance().  The problem is that once this default instance is closed, it cannot be reused.  
> The cobertura maven plugin executes all tests in the same JVM, so once the default Xnio instance is closed, subsequent tests fail.  
> The workaround is to always use a unique Xnio instance, which can be created by calling
>   public static Xnio getInstance(final String name) throws IOException;

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-remoting-issues mailing list