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



##########
File path: 
zeppelin-zengine/src/test/java/org/apache/zeppelin/search/LuceneSearchTest.java
##########
@@ -128,16 +135,16 @@ public void canIndexAndQueryByParagraphTitle() throws 
IOException, InterruptedEx
     assertThat(TitleHits).isAtLeast(1);
   }
 
-  //@Test
-  public void indexKeyContract() throws IOException {
+  @Test
+  public void indexKeyContract() throws IOException, InterruptedException {
     // give
     Note note1 = newNoteWithParagraph("Notebook1", "test");
     // when
-    noteSearchService.addNoteIndex(note1);
+    drainSearchEvents();
     // then
     String id = resultForQuery("test").get(0).get("id"); // 
LuceneSearch.ID_FIELD
 
-    assertThat(Splitter.on("/").split(id)) // key structure 
<noteId>/paragraph/<paragraphId>
+    assertThat(id.split("/")).asList() // key structure 
<noteId>/paragraph/<paragraphId>

Review comment:
       It seems that the comment doesn't match properly.
   ```
       // given
       Note note1 = newNoteWithParagraph("Notebook1", "test");
       drainSearchEvents();
       // when
       String id = resultForQuery("test").get(0).get("id"); // 
LuceneSearch.ID_FIELD
       // then
       assertThat(id.split("/")).asList() // key structure 
<noteId>/paragraph/<paragraphId>
   ```




-- 
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:
us...@infra.apache.org


Reply via email to