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

Aias00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new de78df2227 fix(logging): include generic Huawei config fields (#7129)
de78df2227 is described below

commit de78df22273d7da86cd30a8670c53b8fa69f21fa
Author: Liming Deng <[email protected]>
AuthorDate: Sun Sep 20 09:26:14 2026 +0800

    fix(logging): include generic Huawei config fields (#7129)
---
 .../huawei/lts/config/HuaweiLogCollectConfig.java  |  9 ++++++--
 .../lts/config/HuaweiLogCollectConfigTest.java     | 25 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git 
a/shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-huawei-lts/src/main/java/org/apache/shenyu/plugin/huawei/lts/config/HuaweiLogCollectConfig.java
 
b/shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-huawei-lts/src/main/java/org/apache/shenyu/plugin/huawei/lts/config/HuaweiLogCollectConfig.java
index 74bcbae63e..f073ffe6ac 100644
--- 
a/shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-huawei-lts/src/main/java/org/apache/shenyu/plugin/huawei/lts/config/HuaweiLogCollectConfig.java
+++ 
b/shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-huawei-lts/src/main/java/org/apache/shenyu/plugin/huawei/lts/config/HuaweiLogCollectConfig.java
@@ -470,7 +470,11 @@ public class HuaweiLogCollectConfig {
                     && Objects.equals(getBaseRetryBackoffMs(), 
that.getBaseRetryBackoffMs())
                     && Objects.equals(getMaxRetryBackoffMs(), 
that.getMaxRetryBackoffMs())
                     && Objects.equals(getEnableLocalTest(), 
that.getEnableLocalTest())
-                    && Objects.equals(getSetGiveUpExtraLongSingleLog(), 
that.getSetGiveUpExtraLongSingleLog());
+                    && Objects.equals(getSetGiveUpExtraLongSingleLog(), 
that.getSetGiveUpExtraLongSingleLog())
+                    && Objects.equals(getSampleRate(), that.getSampleRate())
+                    && Objects.equals(getBufferQueueSize(), 
that.getBufferQueueSize())
+                    && Objects.equals(getMaxRequestBody(), 
that.getMaxRequestBody())
+                    && Objects.equals(getMaxResponseBody(), 
that.getMaxResponseBody());
         }
 
         @Override
@@ -479,7 +483,8 @@ public class HuaweiLogCollectConfig {
                     regionName, totalSizeInBytes, maxBlockMs, ioThreadCount,
                     batchSizeThresholdInBytes, batchCountThreshold, lingerMs,
                     retries, baseRetryBackoffMs, maxRetryBackoffMs, 
enableLocalTest,
-                    setGiveUpExtraLongSingleLog);
+                    setGiveUpExtraLongSingleLog, getSampleRate(), 
getBufferQueueSize(),
+                    getMaxRequestBody(), getMaxResponseBody());
         }
     }
 }
diff --git 
a/shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-huawei-lts/src/test/java/org/apache/shenyu/plugin/huawei/lts/config/HuaweiLogCollectConfigTest.java
 
b/shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-huawei-lts/src/test/java/org/apache/shenyu/plugin/huawei/lts/config/HuaweiLogCollectConfigTest.java
index 250e6cf0cc..4b2edfbfe9 100644
--- 
a/shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-huawei-lts/src/test/java/org/apache/shenyu/plugin/huawei/lts/config/HuaweiLogCollectConfigTest.java
+++ 
b/shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-huawei-lts/src/test/java/org/apache/shenyu/plugin/huawei/lts/config/HuaweiLogCollectConfigTest.java
@@ -20,6 +20,9 @@ package org.apache.shenyu.plugin.huawei.lts.config;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+
 public class HuaweiLogCollectConfigTest {
     private final HuaweiLogCollectConfig.HuaweiLtsLogConfig huaweiLtsLogConfig 
= new HuaweiLogCollectConfig.HuaweiLtsLogConfig();
 
@@ -56,4 +59,26 @@ public class HuaweiLogCollectConfigTest {
         Assertions.assertEquals(huaweiLtsLogConfig.getBaseRetryBackoffMs(), 
100L);
         Assertions.assertEquals(huaweiLtsLogConfig.getMaxRetryBackoffMs(), 
100L);
     }
+
+    @Test
+    public void testGenericConfigFieldsParticipateInEquality() {
+        HuaweiLogCollectConfig.HuaweiLtsLogConfig first = new 
HuaweiLogCollectConfig.HuaweiLtsLogConfig();
+        HuaweiLogCollectConfig.HuaweiLtsLogConfig second = new 
HuaweiLogCollectConfig.HuaweiLtsLogConfig();
+
+        assertEquals(first, second);
+        assertEquals(first.hashCode(), second.hashCode());
+
+        second.setSampleRate("0.5");
+        assertNotEquals(first, second);
+        second.setSampleRate(first.getSampleRate());
+        second.setBufferQueueSize(first.getBufferQueueSize() + 1);
+        assertNotEquals(first, second);
+        second.setBufferQueueSize(first.getBufferQueueSize());
+        second.setMaxRequestBody(first.getMaxRequestBody() + 1);
+        assertNotEquals(first, second);
+        second.setMaxRequestBody(first.getMaxRequestBody());
+        second.setMaxResponseBody(first.getMaxResponseBody() + 1);
+        assertNotEquals(first, second);
+        assertNotEquals(first.hashCode(), second.hashCode());
+    }
 }

Reply via email to