jerryshao commented on code in PR #9542:
URL: https://github.com/apache/gravitino/pull/9542#discussion_r2652316850
##########
clients/client-python/tests/integration/test_supports_jobs.py:
##########
@@ -163,10 +160,6 @@ def test_register_and_delete_job_template(self):
with self.assertRaises(NoSuchJobTemplateException):
self._metalake.get_job_template(template2.name)
Review Comment:
This is intentional not to check the total number, since we added and will
add more built-in job templates. Test the total number will break the test.
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/authorization/JobAuthorizationIT.java:
##########
@@ -117,11 +117,14 @@ public void testListJobTemplates() {
// Normal user can see job templates they own (test_1, test_2)
List<JobTemplate> normalUserTemplates =
normalUserClient.loadMetalake(METALAKE).listJobTemplates();
- Assertions.assertEquals(2, normalUserTemplates.size());
+ Assertions.assertTrue(normalUserTemplates.stream().anyMatch(s ->
s.name().equals("test_1")));
+ Assertions.assertTrue(normalUserTemplates.stream().anyMatch(s ->
s.name().equals("test_2")));
// Admin can see all job templates (test_1, test_2, test_3)
List<JobTemplate> adminTemplates =
client.loadMetalake(METALAKE).listJobTemplates();
- Assertions.assertEquals(3, adminTemplates.size());
+ Assertions.assertTrue(adminTemplates.stream().anyMatch(s ->
s.name().equals("test_1")));
+ Assertions.assertTrue(adminTemplates.stream().anyMatch(s ->
s.name().equals("test_2")));
+ Assertions.assertTrue(adminTemplates.stream().anyMatch(s ->
s.name().equals("test_3")));
Review Comment:
This is intentional not to check the total number, since we added and will
add more built-in job templates. Test the total number will break the test.
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/JobIT.java:
##########
@@ -172,10 +169,6 @@ public void testRegisterAndDeleteJobTemplate() {
// Verify the second job template is deleted
Assertions.assertThrows(
NoSuchJobTemplateException.class, () ->
metalake.getJobTemplate(template2.name()));
Review Comment:
This is intentional not to check the total number, since we added and will
add more built-in job templates. Test the total number will break the 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]