<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.x (master)</li>
<li>Operating System version: Ubuntu 16.04</li>
<li>Java version: Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li><code class="notranslate">git checkout b0107e767651d066d68c3beaaca9736aed2292b8</code></li>
<li><code class="notranslate">mvn test -am -pl dubbo-rpc/dubbo-rpc-dubbo -Dtest=DubboProtocolTest#testDubboProtocolWithMina -DfailIfNoTests=false</code></li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">The test should pass.</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">The test fails. Output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Running org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest
2018-11-08 03:47:05,604 INFO [org.apache.dubbo.common.logger.LoggerFactory:?] - using logger: org.apache.dubbo.common.logger.log4j.Log4jLoggerAdapter
2018-11-08 03:47:06,034 INFO [org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol:destroy] -  [DUBBO] Unexport service: dubbo://127.0.0.1:9010/org.apache.dubbo.rpc.protocol.dubbo.support.DemoService?server=mina, dubbo version: , current host: 172.17.0.12
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.657 sec &lt;&lt;&lt; FAILURE! - in org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest
testDubboProtocolWithMina(org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest)  Time elapsed: 0.086 sec  &lt;&lt;&lt; ERROR!
org.apache.dubbo.rpc.RpcException: Unsupported server type: mina, url: dubbo://127.0.0.1:9010/org.apache.dubbo.rpc.protocol.dubbo.support.DemoService?channel.readonly.sent=true&amp;heartbeat=60000&amp;server=mina
        at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest.testDubboProtocolWithMina(DubboProtocolTest.java:99)


Results :

Tests in error:
  DubboProtocolTest.testDubboProtocolWithMina:99 ? Rpc Unsupported server type: ...

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0"><pre class="notranslate"><code class="notranslate">Running org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest
2018-11-08 03:47:05,604 INFO [org.apache.dubbo.common.logger.LoggerFactory:?] - using logger: org.apache.dubbo.common.logger.log4j.Log4jLoggerAdapter
2018-11-08 03:47:06,034 INFO [org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol:destroy] -  [DUBBO] Unexport service: dubbo://127.0.0.1:9010/org.apache.dubbo.rpc.protocol.dubbo.support.DemoService?server=mina, dubbo version: , current host: 172.17.0.12
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.657 sec &lt;&lt;&lt; FAILURE! - in org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest
testDubboProtocolWithMina(org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest)  Time elapsed: 0.086 sec  &lt;&lt;&lt; ERROR!
org.apache.dubbo.rpc.RpcException: Unsupported server type: mina, url: dubbo://127.0.0.1:9010/org.apache.dubbo.rpc.protocol.dubbo.support.DemoService?channel.readonly.sent=true&amp;heartbeat=60000&amp;server=mina
        at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest.testDubboProtocolWithMina(DubboProtocolTest.java:99)


Results :

Tests in error:
  DubboProtocolTest.testDubboProtocolWithMina:99 ? Rpc Unsupported server type: ...

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
</code></pre></div>
<h3 dir="auto">More Details</h3>
<ol dir="auto">
<li>The test <code class="notranslate">DubboProtocolTest.testDubboProtocolWithMina</code> fails when run by itself.</li>
<li>The test passes when run in the whole test class, but the test does not actually test anything about mina.</li>
<li>A possible fix to make the test pass when run by itself (while still not testing anything about mina) is to apply the following patch:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="index b67112c..7a30fec 100644
--- a/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocolTest.java
+++ b/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocolTest.java
@@ -96,6 +96,8 @@ public class DubboProtocolTest {
     @Test
     public void testDubboProtocolWithMina() throws Exception {
         DemoService service = new DemoServiceImpl();
+        protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf(&quot;dubbo://127.0.0.1:9010/&quot; + DemoService.class.getName())));
+        proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf(&quot;dubbo://127.0.0.1:9010/&quot; + DemoService.class.getName()).addParameter(&quot;timeout&quot;, 3000l)));
         protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf(&quot;dubbo://127.0.0.1:9010/&quot; + DemoService.class.getName()).addParameter(Constants.SERVER_KEY, &quot;mina&quot;)));
         service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf(&quot;dubbo://127.0.0.1:9010/&quot; + DemoService.class.getName()).addParameter(Constants.CLIENT_KEY, &quot;mina&quot;).addParameter(&quot;timeout&quot;, 3000l)));
         for (int i = 0; i &lt; 10; i++) {"><pre class="notranslate"><code class="notranslate">index b67112c..7a30fec 100644
--- a/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocolTest.java
+++ b/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocolTest.java
@@ -96,6 +96,8 @@ public class DubboProtocolTest {
     @Test
     public void testDubboProtocolWithMina() throws Exception {
         DemoService service = new DemoServiceImpl();
+        protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName())));
+        proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName()).addParameter("timeout", 3000l)));
         protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName()).addParameter(Constants.SERVER_KEY, "mina")));
         service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName()).addParameter(Constants.CLIENT_KEY, "mina").addParameter("timeout", 3000l)));
         for (int i = 0; i &lt; 10; i++) {
</code></pre></div>
<ol start="4" dir="auto">
<li>The test should be changed to actually test something about mina.</li>
</ol>
<ul dir="auto">
<li>[*] I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li>[*] I have checked the <a href="https://github.com/apache/incubator-dubbo/wiki/FAQ">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<ul dir="auto">
<li>Dubbo version: 2.6.2</li>
<li>Operating System version: CentOS 7</li>
<li>Java version: 1.8</li>
</ul>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/service/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/service">@service</a>(interfaceClass = DubboSwaggerService.class, protocol = "rest", register = false)<br>
register is not work</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/documented/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/documented">@documented</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/retention/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/retention">@retention</a>(RetentionPolicy.RUNTIME)<br>
<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/target/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/target">@target</a>({ElementType.TYPE})<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/inherited/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/inherited">@inherited</a><br>
public <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/interface/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/interface">@interface</a> Service {</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Class&lt;?&gt; interfaceClass() default void.class;

String interfaceName() default &quot;&quot;;

String version() default &quot;&quot;;

String group() default &quot;&quot;;

String path() default &quot;&quot;;

boolean export() default false;

String token() default &quot;&quot;;

boolean deprecated() default false;

boolean dynamic() default false;

String accesslog() default &quot;&quot;;

int executes() default 0;

boolean register() default false;        // this default value should be true"><pre class="notranslate"><code class="notranslate">Class&lt;?&gt; interfaceClass() default void.class;

String interfaceName() default "";

String version() default "";

String group() default "";

String path() default "";

boolean export() default false;

String token() default "";

boolean deprecated() default false;

boolean dynamic() default false;

String accesslog() default "";

int executes() default 0;

boolean register() default false;        // this default value should be true
</code></pre></div>