Skip to content

Commit 92b44fc

Browse files
committed
Check for null
1 parent 74b70bd commit 92b44fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/utils/K8sTestUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,8 @@ public V1Pod getPod(String namespace, String labelSelectors, String podName) {
411411
*/
412412
public boolean isPodTerminating(String namespace, String labelSelectors, String podName) {
413413
V1ObjectMeta metadata;
414-
metadata = getPod(namespace, labelSelectors, podName).getMetadata();
414+
V1Pod pod = getPod(namespace, labelSelectors, podName);
415+
metadata = pod != null ? pod.getMetadata() : null;
415416
if (metadata == null) {
416417
return false;
417418
}

0 commit comments

Comments
 (0)