This is an automated email from the ASF dual-hosted git repository.

jmclean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new bce78de47b Fix incorrect name/comment assignment in 
TestModelMetaService tests (#8296)
bce78de47b is described below

commit bce78de47b962d029e9cc41b28db5baeed5325ec
Author: JeonDaehong <[email protected]>
AuthorDate: Wed Aug 27 14:21:53 2025 +0900

    Fix incorrect name/comment assignment in TestModelMetaService tests (#8296)
    
    **What changes were proposed in this pull request?**
    In `TestModelMetaService.java`, the tests
    testInsertAndUpdateModelComment and testInsertAndUpdateModelProperties
    were incorrectly setting the name and comment fields. This PR fixes the
    assignments so that name and comment are updated correctly according to
    the test's intent.
    
    **Why are the changes needed?**
    Previously, the tests would either overwrite the name with a comment
    value or keep the comment unchanged, causing the tests to not properly
    verify updates. Fixing the assignments ensures that comment updates and
    property updates are correctly tested.
    
    Fixes: #8282
    
    **Does this PR introduce any user-facing change?**
    No. This only fixes test behavior.
    
    **How was this patch tested?**
    - Corrected field assignments in the affected tests.
    - Verified that `testInsertAndUpdateModelComment` correctly updates the
    comment without changing the name.
    - Verified that `testInsertAndUpdateModelProperties` correctly maintains
    the name and updates properties.
    - Ran all existing tests to confirm no regressions.
---
 .../gravitino/storage/relational/service/TestModelMetaService.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/core/src/test/java/org/apache/gravitino/storage/relational/service/TestModelMetaService.java
 
b/core/src/test/java/org/apache/gravitino/storage/relational/service/TestModelMetaService.java
index b66601aae9..b10b1adcab 100644
--- 
a/core/src/test/java/org/apache/gravitino/storage/relational/service/TestModelMetaService.java
+++ 
b/core/src/test/java/org/apache/gravitino/storage/relational/service/TestModelMetaService.java
@@ -266,11 +266,11 @@ public class TestModelMetaService extends TestJDBCBackend 
{
     ModelEntity updatedModel =
         ModelEntity.builder()
             .withId(modelEntity.id())
-            .withName(newComment)
+            .withName(modelEntity.name())
             .withNamespace(modelEntity.namespace())
             .withLatestVersion(modelEntity.latestVersion())
             .withAuditInfo(modelEntity.auditInfo())
-            .withComment(modelEntity.comment())
+            .withComment(newComment)
             .withProperties(modelEntity.properties())
             .build();
 
@@ -309,7 +309,7 @@ public class TestModelMetaService extends TestJDBCBackend {
     ModelEntity updatedModel =
         ModelEntity.builder()
             .withId(modelEntity.id())
-            .withName(modelEntity.comment())
+            .withName(modelEntity.name())
             .withNamespace(modelEntity.namespace())
             .withLatestVersion(modelEntity.latestVersion())
             .withAuditInfo(modelEntity.auditInfo())

Reply via email to