This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git
The following commit(s) were added to refs/heads/main by this push:
new a04c2bb [SPARK-53646] Improve `KubernetesMetricsInterceptorTest` to
verify `http.request` metric
a04c2bb is described below
commit a04c2bb9aeee5856681f796129e2f698a38e6ac1
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Fri Sep 19 11:05:22 2025 -0700
[SPARK-53646] Improve `KubernetesMetricsInterceptorTest` to verify
`http.request` metric
### What changes were proposed in this pull request?
This PR aims to improve `KubernetesMetricsInterceptorTest` to verify
`http.request` metric additionally.
### Why are the changes needed?
`http.request` metric is also important.
### Does this PR introduce _any_ user-facing change?
No, this is a test-only improvement.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #326 from dongjoon-hyun/SPARK-53646.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../k8s/operator/metrics/source/KubernetesMetricsInterceptorTest.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/spark-operator/src/test/java/org/apache/spark/k8s/operator/metrics/source/KubernetesMetricsInterceptorTest.java
b/spark-operator/src/test/java/org/apache/spark/k8s/operator/metrics/source/KubernetesMetricsInterceptorTest.java
index 9cf5681..3ad89fc 100644
---
a/spark-operator/src/test/java/org/apache/spark/k8s/operator/metrics/source/KubernetesMetricsInterceptorTest.java
+++
b/spark-operator/src/test/java/org/apache/spark/k8s/operator/metrics/source/KubernetesMetricsInterceptorTest.java
@@ -97,6 +97,7 @@ class KubernetesMetricsInterceptorTest {
Meter metric = (Meter) metrics2.get(name);
Assertions.assertEquals(metric.getCount(), 1);
});
+ Assertions.assertEquals(((Meter)
metrics2.get("http.request")).getCount(), 2);
client.resource(sparkApplication).delete();
}
}
@@ -122,6 +123,7 @@ class KubernetesMetricsInterceptorTest {
Assertions.assertEquals(12, map.size());
Meter metric = (Meter) map.get("failed");
Assertions.assertEquals(metric.getCount(), retry + 1);
+ Assertions.assertEquals(((Meter) map.get("http.request")).getCount(),
retry + 1);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]