[GitHub] [flink] Mrart commented on a diff in pull request #21527: [FLINK-27925] [kubernetes]Performance optimization when watch tm pod and list pod.
Mrart commented on code in PR #21527: URL: https://github.com/apache/flink/pull/21527#discussion_r1192918839 ## flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesClientTestBase.java: ## @@ -143,6 +147,34 @@ protected void mockGetDeploymentWithError() { server.expect().get().withPath(path).andReturn(500, "Expected error").always(); } +protected void mockPodEventWithLabels(Map labels) { +final Pod pod1 = +new PodBuilder() +.withNewMetadata() +.withNamespace("test") +.withName("tm_pod1") +.withLabels(labels) +.withResourceVersion("5668") +.endMetadata() +.build(); +// mock four kinds of events. +server.expect() +.withPath( + "/api/v1/namespaces/test/pods?labelSelector=label1%3Dvalue1%2Clabel2%3Dvalue2=0=true=true") +.andUpgradeToWebSocket() +.open() +.waitFor(1000) Review Comment: I have test, It at most 1 second. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [flink] Mrart commented on a diff in pull request #21527: [FLINK-27925] [kubernetes]Performance optimization when watch tm pod and list pod.
Mrart commented on code in PR #21527: URL: https://github.com/apache/flink/pull/21527#discussion_r1191070958 ## flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesClientTestBase.java: ## @@ -143,6 +147,34 @@ protected void mockGetDeploymentWithError() { server.expect().get().withPath(path).andReturn(500, "Expected error").always(); } +protected void mockPodEventWithLabels(Map labels) { +final Pod pod1 = +new PodBuilder() +.withNewMetadata() +.withNamespace("test") +.withName("tm_pod1") +.withLabels(labels) +.withResourceVersion("5668") +.endMetadata() +.build(); +// mock four kinds of events. +server.expect() +.withPath( + "/api/v1/namespaces/test/pods?labelSelector=label1%3Dvalue1%2Clabel2%3Dvalue2=0=true=true") +.andUpgradeToWebSocket() +.open() +.waitFor(1000) Review Comment: definitely wait for 1 second -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [flink] Mrart commented on a diff in pull request #21527: [FLINK-27925] [kubernetes]Performance optimization when watch tm pod and list pod.
Mrart commented on code in PR #21527: URL: https://github.com/apache/flink/pull/21527#discussion_r1191067760 ## flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesClientTestBase.java: ## @@ -143,6 +147,34 @@ protected void mockGetDeploymentWithError() { server.expect().get().withPath(path).andReturn(500, "Expected error").always(); } +protected void mockPodEventWithLabels(Map labels) { +final Pod pod1 = +new PodBuilder() +.withNewMetadata() +.withNamespace("test") +.withName("tm_pod1") +.withLabels(labels) +.withResourceVersion("5668") +.endMetadata() +.build(); +// mock four kinds of events. +server.expect() +.withPath( + "/api/v1/namespaces/test/pods?labelSelector=label1%3Dvalue1%2Clabel2%3Dvalue2=0=true=true") +.andUpgradeToWebSocket() +.open() +.waitFor(1000) Review Comment: The waitFor parameter specifies the amount of time the program should wait for the expected output to appear before timing out. If the expected output does not appear within the specified time, the program will raise a timeout error. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org