zjffdu commented on a change in pull request #4299:
URL: https://github.com/apache/zeppelin/pull/4299#discussion_r815614695
##########
File path:
zeppelin-server/src/test/java/org/apache/zeppelin/rest/NotebookRestApiTest.java
##########
@@ -693,39 +691,55 @@ public void testRunAllParagraph_FirstFailed() throws
IOException {
@Test
public void testCloneNote() throws IOException {
- LOG.info("Running testCloneNote");
- String note1Id = null;
- String clonedNoteId = null;
- try {
- note1Id = TestUtils.getInstance(Notebook.class).createNote("note1",
anonymous);
- CloseableHttpResponse post = httpPost("/notebook/" + note1Id, "");
- String postResponse = EntityUtils.toString(post.getEntity(),
StandardCharsets.UTF_8);
- LOG.info("testCloneNote response\n" + postResponse);
- assertThat(post, isAllowed());
- Map<String, Object> resp = gson.fromJson(postResponse,
- new TypeToken<Map<String, Object>>() {}.getType());
- clonedNoteId = (String) resp.get("body");
- post.close();
-
- CloseableHttpResponse get = httpGet("/notebook/" + clonedNoteId);
- assertThat(get, isAllowed());
- Map<String, Object> resp2 =
gson.fromJson(EntityUtils.toString(get.getEntity(), StandardCharsets.UTF_8),
- new TypeToken<Map<String, Object>>() {}.getType());
- Map<String, Object> resp2Body = (Map<String, Object>) resp2.get("body");
-
- // assertEquals(resp2Body.get("name"), "Note " + clonedNoteId);
- get.close();
- } finally {
- // cleanup
- if (null != note1Id) {
- TestUtils.getInstance(Notebook.class).removeNote(note1Id, anonymous);
- }
- if (null != clonedNoteId) {
- TestUtils.getInstance(Notebook.class).removeNote(clonedNoteId,
anonymous);
+ LOG.info("Running testCloneNote");
Review comment:
Indention issue
--
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]