sdhzwc commented on code in PR #16775:
URL: 
https://github.com/apache/dolphinscheduler/pull/16775#discussion_r1832007799


##########
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProjectParameterControllerTest.java:
##########
@@ -47,12 +48,17 @@ public class ProjectParameterControllerTest {
     @Test
     public void testCreateProjectParameter() {
         User loginUser = getGeneralUser();
+        Result successResult = getSuccessResult();
+        successResult.setData(getProjectParameter());
 
         
Mockito.when(projectParameterService.createProjectParameter(Mockito.any(), 
Mockito.anyLong(), Mockito.any(),
-                Mockito.any(), Mockito.any())).thenReturn(getSuccessResult());
+                Mockito.any(), Mockito.any())).thenReturn(successResult);
         Result result = 
projectParameterController.createProjectParameter(loginUser, 1, "key", "value",
                 DataType.VARCHAR.name());
         Assertions.assertEquals(Status.SUCCESS.getCode(), result.getCode());
+
+        ProjectParameter projectParameter = (ProjectParameter) 
result.getData();
+        Assertions.assertEquals(1, projectParameter.getOperator());

Review Comment:
   > If you revert the change of `projectParameterService` the case still pass.
   
   You've undone the modification, so isn't the operator now null, or are we 
not on the same page?



-- 
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]

Reply via email to