github-advanced-security[bot] commented on code in PR #19154:
URL: https://github.com/apache/druid/pull/19154#discussion_r2932635965
##########
extensions-core/kubernetes-overlord-extensions/src/test/java/org/apache/druid/k8s/overlord/taskadapter/K8sTaskAdapterTest.java:
##########
@@ -196,17 +191,17 @@
);
client.batch().v1().jobs().inNamespace("test").create(jobFromSpec);
JobList jobList = client.batch().v1().jobs().inNamespace("test").list();
- assertEquals(1, jobList.getItems().size());
+ Assertions.assertEquals(1, jobList.getItems().size());
// assert that the size of the pod is 1g
Job myJob = Iterables.getOnlyElement(jobList.getItems());
Quantity containerMemory =
myJob.getSpec().getTemplate().getSpec().getContainers().get(0).getResources().getLimits().get("memory");
String amount = containerMemory.getAmount();
- assertEquals(2400000000L, Long.valueOf(amount));
- assertTrue(StringUtils.isBlank(containerMemory.getFormat())); // no units
specified we talk in bytes
+ Assertions.assertEquals(2400000000L, Long.valueOf(amount));
Review Comment:
## Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more
details](https://github.com/apache/druid/security/code-scanning/10890)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]