You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2026/03/14 10:39:24 UTC
(shardingsphere) branch master updated: Fix IpUtilsTest (#38432)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e314c87c5c5 Fix IpUtilsTest (#38432)
e314c87c5c5 is described below
commit e314c87c5c5005396712072080450a06732cdc89
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Mar 14 18:39:18 2026 +0800
Fix IpUtilsTest (#38432)
---
.../java/org/apache/shardingsphere/infra/instance/util/IpUtilsTest.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/infra/common/src/test/java/org/apache/shardingsphere/infra/instance/util/IpUtilsTest.java b/infra/common/src/test/java/org/apache/shardingsphere/infra/instance/util/IpUtilsTest.java
index 8c64d1e5b7c..44921cb6742 100644
--- a/infra/common/src/test/java/org/apache/shardingsphere/infra/instance/util/IpUtilsTest.java
+++ b/infra/common/src/test/java/org/apache/shardingsphere/infra/instance/util/IpUtilsTest.java
@@ -19,6 +19,7 @@ package org.apache.shardingsphere.infra.instance.util;
import org.apache.shardingsphere.test.infra.framework.extension.mock.AutoMockExtension;
import org.apache.shardingsphere.test.infra.framework.extension.mock.StaticMockSettings;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -45,6 +46,7 @@ import static org.mockito.Mockito.when;
@StaticMockSettings(NetworkInterface.class)
class IpUtilsTest {
+ @BeforeEach
@AfterEach
void clearCachedIpAddress() throws ReflectiveOperationException {
Plugins.getMemberAccessor().set(IpUtils.class.getDeclaredField("cachedIpAddress"), null, null);