martin-g commented on code in PR #20498:
URL: https://github.com/apache/flink/pull/20498#discussion_r990978596
##########
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClientTest.java:
##########
@@ -630,4 +630,37 @@ private KubernetesConfigMap buildTestingConfigMap() {
.withData(data)
.build());
}
+
+ @Test
+ void testMockPrePreparedResources() throws Exception {
+ // regenerate a test JM spec
+ Deployment testDeployment =
kubernetesJobManagerSpecification.getDeployment();
+ List<HasMetadata> testAccompanyingResources =
+ kubernetesJobManagerSpecification.getAccompanyingResources();
+ List<HasMetadata> mockPrePreparedResources = new ArrayList<>();
+ for (int i = 0; i < 3; i++) {
+ Pod mockPod =
+ new PodBuilder()
+ .editOrNewMetadata()
+
.withName(String.format("mock-pod-preprepared-resource%d", i))
Review Comment:
1) It is easier to read
2) it is faster (`String.format()` is slower!), but this is not really
important for this test
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]