liuxunorg commented on a change in pull request #3609: [ZEPPELIN-4555]. 
paragraph title is disappear after I run the paragraph
URL: https://github.com/apache/zeppelin/pull/3609#discussion_r368412646
 
 

 ##########
 File path: 
zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java
 ##########
 @@ -1123,29 +1123,35 @@ public void testInterpreterSettingConfig() {
     //      "checkEmpty": true
     //    },
     p1.setText("%config_test sleep 1000");
-    note.runAll(AuthenticationInfo.ANONYMOUS, false);
-
-    // wait until first paragraph finishes and second paragraph starts
-    while (p1.getStatus() != Status.FINISHED) Thread.yield();
+    p1.execute(true);
 
     // Check if the config_test interpreter default parameter takes effect
     LOGGER.info("p1.getConfig() =  " + p1.getConfig());
-    assertEquals(config.get(Paragraph.PARAGRAPH_CONFIG_RUNONSELECTIONCHANGE), 
false);
-    assertEquals(config.get(Paragraph.PARAGRAPH_CONFIG_TITLE), true);
-    assertEquals(config.get(Paragraph.PARAGRAPH_CONFIG_CHECK_EMTPY), false);
+    
assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_RUNONSELECTIONCHANGE),
 false);
+    assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_TITLE), true);
+    assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_CHECK_EMTPY), 
false);
 
     // The mock1 interpreter does not set default parameters
     p1.setText("%mock1 sleep 1000");
-    note.runAll(AuthenticationInfo.ANONYMOUS, false);
+    p1.execute(true);
 
-    // wait until first paragraph finishes and second paragraph starts
-    while (p1.getStatus() != Status.FINISHED) Thread.yield();
+    // mock1 has no config setting in interpreter-setting.json, so keep the 
previous config
+    LOGGER.info("changed intp p1.getConfig() =  " + p1.getConfig());
+    
assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_RUNONSELECTIONCHANGE),
 false);
+    assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_TITLE), true);
+    assertEquals(config.get(InterpreterSetting.PARAGRAPH_CONFIG_CHECK_EMTPY), 
false);
 
 Review comment:
   `config_test` interpreter's setting checkEmpty=false
   ```
         "config": {
           "fontSize": 9,
           "colWidth": 12,
           "runOnSelectionChange": false,
           "title": true,
           "checkEmpty": false
         },
   ```
   
   Change paragraph test to `p1.setText("%mock1 sleep 1000");`, 
   But `mock1` interpreter's unsetting checkEmpty.
   `InterpreterSetting.PARAGRAPH_CONFIG_CHECK_EMTPY` Should the default value 
be equal to `true`??

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to