You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/02/05 08:28:57 UTC

[dubbo] branch 2.7.8.1-release updated (86a6ec6 -> c4f3aa1)

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a change to branch 2.7.8.1-release
in repository https://gitbox.apache.org/repos/asf/dubbo.git.


    from 86a6ec6  fix codec ut
     new 77457bb  check serialization type
     new c4f3aa1  ignore ut

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java     | 2 +-
 .../test/java/org/apache/dubbo/remoting/etcd/jetcd/LeaseTest.java   | 2 ++
 .../main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java   | 6 ++++++
 .../java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocolTest.java | 1 +
 4 files changed, 10 insertions(+), 1 deletion(-)


[dubbo] 01/02: check serialization type

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch 2.7.8.1-release
in repository https://gitbox.apache.org/repos/asf/dubbo.git

commit 77457bbeacff4560a158197fcf9d56b83c3103b7
Author: ken.lj <ke...@gmail.com>
AuthorDate: Fri Feb 5 16:27:51 2021 +0800

    check serialization type
---
 .../org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java     | 2 +-
 .../main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java   | 6 ++++++
 .../java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocolTest.java | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java
index f4c6872..5031470 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/codec/ExchangeCodec.java
@@ -421,7 +421,7 @@ public class ExchangeCodec extends TelnetCodec {
         try {
             if (eventBytes != null) {
                 int dataLen = eventBytes.length;
-                int threshold = ConfigurationUtils.getSystemConfiguration().getInt("deserialization.event.size", 10);
+                int threshold = ConfigurationUtils.getSystemConfiguration().getInt("deserialization.event.size", 50);
                 if (dataLen > threshold) {
                     throw new IllegalArgumentException("Event data too long, actual size " + dataLen + ", threshold " + threshold + " rejected for security consideration.");
                 }
diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java
index 1686549..c6c7994 100644
--- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java
+++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java
@@ -231,11 +231,17 @@ public class DubboCodec extends ExchangeCodec {
 
     @Override
     protected Serialization getSerialization(Channel channel, Request req) {
+        if (!(req.getData() instanceof Invocation)) {
+            return super.getSerialization(channel, req);
+        }
         return DubboCodecSupport.getRequestSerialization(channel.getUrl(), (Invocation) req.getData());
     }
 
     @Override
     protected Serialization getSerialization(Channel channel, Response res) {
+        if (!(res.getResult() instanceof AppResponse)) {
+            return super.getSerialization(channel, res);
+        }
         return DubboCodecSupport.getResponseSerialization(channel.getUrl(), (AppResponse) res.getResult());
     }
 
diff --git 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
index e55f7ac..e432dbd 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
@@ -214,6 +214,7 @@ public class DubboProtocolTest {
             service.returnNonSerialized();
             Assertions.fail();
         } catch (RpcException e) {
+            e.printStackTrace();
             Assertions.assertTrue(e.getMessage().contains("org.apache.dubbo.rpc.protocol.dubbo.support.NonSerialized must implement java.io.Serializable"));
         }
     }


[dubbo] 02/02: ignore ut

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch 2.7.8.1-release
in repository https://gitbox.apache.org/repos/asf/dubbo.git

commit c4f3aa1c5b8771fe1a196f0e879166905d8edb45
Author: ken.lj <ke...@gmail.com>
AuthorDate: Fri Feb 5 16:28:01 2021 +0800

    ignore ut
---
 .../src/test/java/org/apache/dubbo/remoting/etcd/jetcd/LeaseTest.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dubbo-remoting/dubbo-remoting-etcd3/src/test/java/org/apache/dubbo/remoting/etcd/jetcd/LeaseTest.java b/dubbo-remoting/dubbo-remoting-etcd3/src/test/java/org/apache/dubbo/remoting/etcd/jetcd/LeaseTest.java
index 898e1a9..5e79480 100644
--- a/dubbo-remoting/dubbo-remoting-etcd3/src/test/java/org/apache/dubbo/remoting/etcd/jetcd/LeaseTest.java
+++ b/dubbo-remoting/dubbo-remoting-etcd3/src/test/java/org/apache/dubbo/remoting/etcd/jetcd/LeaseTest.java
@@ -45,6 +45,7 @@ import io.etcd.jetcd.options.PutOption;
 import io.etcd.jetcd.support.CloseableClient;
 import io.etcd.jetcd.support.Observers;
 import io.grpc.stub.StreamObserver;
+import org.junit.Ignore;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeAll;
@@ -61,6 +62,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 /**
  * @author cvictory ON 2019-08-16
  */
+@Ignore
 public class LeaseTest {
 
     private static EtcdCluster cluster;