You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/11/10 14:39:05 UTC

[skywalking] branch ut-fix created (now e38ccd2cb1)

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

wusheng pushed a change to branch ut-fix
in repository https://gitbox.apache.org/repos/asf/skywalking.git


      at e38ccd2cb1 Fix UT K8sTagTest.

This branch includes the following new commits:

     new e38ccd2cb1 Fix UT K8sTagTest.

The 1 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.



[skywalking] 01/01: Fix UT K8sTagTest.

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

wusheng pushed a commit to branch ut-fix
in repository https://gitbox.apache.org/repos/asf/skywalking.git

commit e38ccd2cb171b07b47582fc929c82d887bd5cb6f
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Nov 10 22:38:57 2022 +0800

    Fix UT K8sTagTest.
---
 .../java/org/apache/skywalking/oap/meter/analyzer/dsl/K8sTagTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/oap-server/analyzer/meter-analyzer/src/test/java/org/apache/skywalking/oap/meter/analyzer/dsl/K8sTagTest.java b/oap-server/analyzer/meter-analyzer/src/test/java/org/apache/skywalking/oap/meter/analyzer/dsl/K8sTagTest.java
index f0f7fd50a5..a3c38da3ff 100644
--- a/oap-server/analyzer/meter-analyzer/src/test/java/org/apache/skywalking/oap/meter/analyzer/dsl/K8sTagTest.java
+++ b/oap-server/analyzer/meter-analyzer/src/test/java/org/apache/skywalking/oap/meter/analyzer/dsl/K8sTagTest.java
@@ -34,6 +34,7 @@ import java.util.Optional;
 import io.kubernetes.client.openapi.models.V1ServiceStatus;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.skywalking.library.kubernetes.KubernetesClient;
 import org.apache.skywalking.library.kubernetes.KubernetesPods;
 import org.apache.skywalking.library.kubernetes.KubernetesServices;
 import org.apache.skywalking.library.kubernetes.ObjectID;
@@ -60,7 +61,7 @@ import static org.junit.Assert.fail;
 @PowerMockIgnore({"javax.net.ssl.*", "javax.management.*"})
 @RunWith(PowerMockRunner.class)
 @PowerMockRunnerDelegate(Parameterized.class)
-@PrepareForTest({KubernetesPods.class, KubernetesServices.class})
+@PrepareForTest({KubernetesPods.class, KubernetesServices.class, KubernetesClient.class})
 public class K8sTagTest {
 
     @Parameterized.Parameter
@@ -257,6 +258,7 @@ public class K8sTagTest {
     @SneakyThrows
     @Before
     public void setup() {
+        PowerMockito.mockStatic(KubernetesClient.class);
         PowerMockito.mockStatic(KubernetesServices.class);
         PowerMockito.mockStatic(KubernetesPods.class);