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/04/02 10:04:51 UTC

[GitHub] [zeppelin] cuspymd commented on a change in pull request #4079: [ZEPPELIN-5288]. Add rest api to reload note

cuspymd commented on a change in pull request #4079:
URL: https://github.com/apache/zeppelin/pull/4079#discussion_r606168837



##########
File path: zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java
##########
@@ -78,6 +78,39 @@ public void setUp() {
     anonymous = new AuthenticationInfo("anonymous");
   }
 
+  @Test
+  public void testGetReloadNote() throws IOException {
+    LOG.info("Running testGetNote");
+    Note note1 = null;
+    try {
+      note1 = TestUtils.getInstance(Notebook.class).createNote("note1", anonymous);
+      note1.addNewParagraph(AuthenticationInfo.ANONYMOUS);
+      TestUtils.getInstance(Notebook.class).saveNote(note1, anonymous);
+      CloseableHttpResponse get = httpGet("/notebook/" + note1.getId());
+      assertThat(get, isAllowed());
+      Map<String, Object> resp = gson.fromJson(EntityUtils.toString(get.getEntity(), StandardCharsets.UTF_8),
+              new TypeToken<Map<String, Object>>() {}.getType());

Review comment:
       It is repeated in all tests, and it would be good to separate it into a function later.




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