You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2021/02/26 08:03:57 UTC

[GitHub] [zeppelin] Reamer commented on a change in pull request #4061: [ZEPPELIN-5262] Add feature 'rename note' for Zeppelin Client

Reamer commented on a change in pull request #4061:
URL: https://github.com/apache/zeppelin/pull/4061#discussion_r583450426



##########
File path: zeppelin-client-examples/src/main/java/org/apache/zeppelin/client/examples/ZeppelinClientExample.java
##########
@@ -41,6 +41,10 @@ public static void main(String[] args) throws Exception {
       noteId = zClient.createNote(notePath);
       System.out.println("Created note: " + noteId);
 
+      zClient.renameNote(noteId, notePath + "_rename");
+      NoteResult renamedNoteResult = zClient.queryNoteResult(noteId);
+      System.out.println("Rename note: " + noteId + " name to " + renamedNoteResult.getNoteName());

Review comment:
       @zjffdu You are sure that you want to use the assert function of JUnit outside of a test class?

##########
File path: zeppelin-client-examples/src/main/java/org/apache/zeppelin/client/examples/ZeppelinClientExample.java
##########
@@ -41,6 +43,13 @@ public static void main(String[] args) throws Exception {
       noteId = zClient.createNote(notePath);
       System.out.println("Created note: " + noteId);
 
+      String newNotePath = notePath + "_rename";
+      zClient.renameNote(noteId, newNotePath);
+
+      NoteResult renamedNoteResult = zClient.queryNoteResult(noteId);
+      assert Objects.equals(newNotePath, renamedNoteResult.getNotePath());

Review comment:
       @zjffdu You are sure that you want to use the assert function of JUnit outside of a test class?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org